Run Samba Server on Debian
Run Samba Server on Debian
In this tutorial, you will learn how to set up and run a Samba server on the Milk-V Duo 256M running Debian.
Step 1: Update Package List
First, update the package list to ensure you have the latest information on the newest versions of packages and their dependencies:
sudo apt update
Step 2: Install Samba and UFW
Next, install Samba and UFW (Uncomplicated Firewall):
sudo apt install samba ufw
Step 3: Backup Samba Configuration
Create a backup of the original Samba configuration file:
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
Step 4: Edit Samba Configuration
Edit the Samba configuration file to set up the home directories for sharing:
sudo nano /etc/samba/smb.conf
Add the following configuration to the file:
[homes]
comment = Home Directories
browseable = yes
path = /home/debian/
read only = no
create mask = 0775
directory mask = 0775
Step 5: Add Samba User
Add a Samba user and set a password for the user:
sudo smbpasswd -a debian
Step 6: Restart Samba Services
Restart the Samba services to apply the changes:
sudo systemctl restart smbd nmbd
Step 7: Configure Firewall
Allow Samba through the firewall:
sudo ufw allow samba
Enable the firewall if it is not already enabled:
sudo ufw enable
Step 8: Verify Samba Services
Check the status of the Samba services to ensure they are running correctly:
sudo systemctl status smbd nmbd
Step 9: Access Shared Directories
You can now access the shared directories from another machine on the same network using the following format:
\\<your-board-ip>\homes
Replace <your-board-ip> with the IP address of your Milk-V Duo board.