Interactive Samba NAS setup tool for Debian and Raspberry Pi OS. Create and manage a network share in minutes — no manual config needed.
- Interactive whiptail menu (raspi-config style)
- Automatic Samba installation
- Creates Linux + Samba user
- Creates and configures NAS share
- Automatically edits smb.conf
- Optional guest access
- Opens firewall (UFW) if enabled
- Shows ready-to-use connection data
- Status, config check & troubleshooting tools
- Modular structure (clean & extendable)
- Debian / Ubuntu / Raspberry Pi OS
- sudo privileges
- Internet connection
Install dependencies:
sudo apt update
sudo apt install whiptail samba -yClone the repository:
git clone git@github.com:sudoAndro/samba-nas-setup.git
cd samba-nas-setupStart the tool:
bash menu.shAfter starting, you will see a menu like:
1) Install Samba NAS
2) Restart Samba
3) Show Samba Status
4) Check Samba Config
5) Show Current Share Config
6) Windows / Phone connection data
7) About / Help
8) Exit
\\SERVER-IP\SHARENAME
Example:
\\192.168.50.233\share
smb://SERVER-IP/SHARENAME
Example:
smb://192.168.50.233/share
After installation, the tool shows:
- Server IP
- Share name
- Username
- Password (hidden)
- Username ≠ Share name
- Use the correct credentials when connecting
samba-nas-setup
├─ menu.sh # main menu
├─ common.sh # shared functions (banner, helpers)
├─ functions.sh # core logic
├─ install.sh # optional installer
├─ uninstall.sh # remove share config
├─ README.md
├─ docs
│ └─ setup.md
├─ examples
│ └─ smb-share-example.conf
└─ images
└─ menu.png
The tool:
- Installs Samba (if not installed)
- Creates a Linux user
- Creates a Samba user
- Creates a share directory
- Configures
/etc/samba/smb.conf - Restarts Samba service
- Stores last setup in:
/etc/samba-nas-setup.conf
Run:
bash uninstall.shThis removes:
- Samba share config from
smb.conf
- user accounts
- share directories
(This is intentional to avoid data loss)
- Do not run multiple setups with the same share name
- Always check config after changes
- Use menu option 4 (Check Samba Config) if something fails
See:
docs/setup.md
See:
examples/smb-share-example.conf
sudoAndro
MIT License
