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
  • ZFS installed with a pre-existing pool
  • Python 3.11
  • sudo privileges

Installation

Install package

sudo apt update
sudo apt install -y pipx samba samba-common-bin avahi-daemon
sudo PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin 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.4.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smb_zfs-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 19.2 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d11e0d72783cf226d0bcbf627a9380006feb3d8e4f12708efc24d0b146004342
MD5 a837bbe5b7f2ff3bade3d94a798847ac
BLAKE2b-256 be3e4144872ad0132af61cd6e785dcb40cccd147bfc4d3f285aba7e4d141bfab

See more details on using hashes here.

Provenance

The following attestation bundles were made for smb_zfs-0.4.0-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