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

  • A Debian-based Linux distribution.
  • Python >= 3.10
  • ZFS installed with a pre-existing pool.
  • sudo privileges.

Installation

Install the package

sudo apt update
sudo apt install pipx
sudo pipx ensurepath --global
sudo pipx install git+https://github.com/mietzen/smb-zfs.git

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.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: smb_zfs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9cb466d79a43e6cd7235981d23afd7e2017b856a629097686ce53a70d4d423c5
MD5 9503aff59c88e8ca8b1ea89e603ec3f5
BLAKE2b-256 f2c4d8a05673580731da9b4fc95bf24eebae2d34efba460d246a72be21cd7e38

See more details on using hashes here.

Provenance

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

Publisher: pypi.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