Skip to main content

A tool to manage Samba on a ZFS-backed system.

Project description

Samba & ZFS Management Tool

A command-line tool for simplifying Samba share management on ZFS-backed systems.

smb-zfs automates the setup and administration of users, groups, and shares, ensuring Samba and ZFS configurations remain synchronized.

It provides a reliable interface for common administrative tasks through two modes: a standard CLI smb-zfs for scripting and an interactive wizard smb-zfs-wizard for guided setup.

$ smb-zfs -h                                                                                                  
usage: smb-zfs [-h] [-v] {install,create,delete,list,passwd,uninstall} ...

A tool to manage Samba on a ZFS-backed system.

positional arguments:
  {install,create,delete,list,passwd,uninstall}
                        Available commands
    install             Initial setup of Samba, ZFS, and Avahi.
    create              Create a new user, share, or group.
    delete              Remove a user, share, or group.
    list                List all items of a specific type.
    passwd              Change a user's password.
    uninstall           Remove all configurations, data, and packages.

options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit

Prerequisites

  • Debian 12 - Bookworm or newer
  • ZFS installed with a pre-existing pool
  • Python >= 3.10
  • sudo privileges

Installation

Install package

sudo apt update
sudo apt install pipx samba samba-common-bin avahi-daemon -y
sudo pipx ensurepath --global
sudo pipx install smb-zfs

This makes the smb-zfs and smb-zfs-wizard commands available system-wide.

Quick Start

All commands must be run with root privileges.

Initial Setup:

sudo smb-zfs install --pool <your-zfs-pool>

Create a User:

sudo smb-zfs create user john --shell

Create a Share:

# Creates the dataset 'your-zfs-pool/data/media'
sudo smb-zfs create share media --dataset data/media

Use the Wizard for Guided Setup

sudo smb-zfs-wizard install
sudo smb-zfs-wizard create user

For a full list of commands, use the --help flag with any command.

Uninstallation

Install the package

sudo smb-zfs-wizard remove
sudo pipx remove smb-zfs

# Remove apt pkgs
sudo apt remove pipx samba samba-common-bin avahi-daemon

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smb_zfs-0.2.11-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file smb_zfs-0.2.11-py3-none-any.whl.

File metadata

  • Download URL: smb_zfs-0.2.11-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for smb_zfs-0.2.11-py3-none-any.whl
Algorithm Hash digest
SHA256 9f3e9816d4bbfd37f2c290b4e769728c3f4e3ca0a63068cb70dd0fb35fd9566a
MD5 c10264779564590a50411ae053cc6a37
BLAKE2b-256 8f7fee0f5fefa7cf6b521159fb5b288fa2abfd0416be0737e3813e5373875cfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for smb_zfs-0.2.11-py3-none-any.whl:

Publisher: release.yml on mietzen/smb-zfs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page