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.1-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: smb_zfs-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 19.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0d2185d554b263e9f1aa62ed3d445056de35c09642d7e6db246d8138fd7b6f1
MD5 3ffc6c50762c23759ce6ddd433a7dad3
BLAKE2b-256 91cc72417f767c46f41c652c4889401e67ae81701b5ac39c1db2cc5db97481ed

See more details on using hashes here.

Provenance

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