An interactive terminal UI (TUI) for managing Samba shares on Linux — built for Raspberry Pi but works on any Debian/Ubuntu system.
- Device & UUID Table — see all connected block devices, filesystems, UUIDs, mount status, fstab presence and Samba share status in one view
- Share Overview — list all current Samba shares from
smb.confwith matched UUID, path, and mount status - Add Share Wizard — guided 6-step wizard to:
- Select device from a list
- Set/confirm mount point
- Name the share
- Set valid users and permissions (read-only or writable)
- Add fstab entry for auto-mount on boot
- Mount the device
- Auto-backup
smb.confbefore making any changes - Append the new share block
- Restart
smbdandnmbd
- Backup smb.conf — one-key manual backup with timestamp
- Samba Status — scrollable
systemctl status smbd nmbdoutput - Edit smb.conf — opens in
nanodirectly from the TUI - Restart Samba — with confirmation prompt
- Supports ext4, NTFS, exFAT filesystems
- Error checking at every step with clear messages
- Python 3.7+
- Samba (
smbd,nmbd) ntfs-3g(for NTFS drives)exfat-fuse(for exFAT drives)lsblk,blkid(usually pre-installed)
git clone https://github.com/yourusername/samba-manager.git
cd samba-manager
sudo ./install.shThen run it anytime with:
sudo samba-managersudo python3 samba_manager.pyNavigate with arrow keys or j/k. Press the highlighted key for each action.
┌─────────────────────────────────────┐
│ ⚡ SAMBA MANAGER MAIN MENU │
│ │
│ [1] View Devices & UUID Table │
│ [2] View Current Samba Shares │
│ [3] Add New Samba Share (Wizard) │
│ [4] Backup smb.conf │
│ [5] Restart Samba Services │
│ [6] Check Samba Status │
│ [7] Edit smb.conf (nano) │
│ [q] Quit │
└─────────────────────────────────────┘
Every time a share is added (or manually triggered), a timestamped backup of smb.conf is saved to:
~/.samba-manager/backups/smb.conf.YYYYMMDD_HHMMSS.bak
| Filesystem | fstab options used |
|---|---|
| ext4 | defaults,nofail |
| ntfs/ntfs-3g | defaults,uid=1000,gid=1000,umask=0022,nofail |
| exfat | defaults,uid=1000,gid=1000,umask=0022,nofail |
| other | defaults,nofail with auto type |
sudo rm /usr/local/bin/samba-manager
sudo rm -rf /usr/local/lib/samba-managerBackups in ~/.samba-manager/ are preserved.
MIT — see LICENSE