Skip to main content

Setting up a Samba share on Debian 11

Step 1 - Install samba

apt update
apt upgrade
apt install samba -y

Check samba status

systemctl status smbd

image.png


Step 2 - Configure Samba

nano /etc/samba/smb.conf

at the bottom use the following template

[New Share] #share name
comment = <comment> #comment for share
path = <absolute path to share>
browseable = yes
Read only = no #sets read only status
guest ok = no #sets if anonymous users can access shares
valid users = jarvis #if guest ok = no, sets what users can access share

After added settings block, restart Samba

systemctl restart smbd


Step 3 - Verify config

image.png

testparm

image.png


Step 4 - Set up Samba user

If using guest access, the following is not needed
To set up Samba user account

smbpasswd -a <username>

NOTE: User must be a UNIX user on the system as well

adduser <username>

some extra packages are needed for best connection

apt install samba-client cifs-utils

 

 

 

Sources

https://www.fosslinux.com/50871/configure-samba-in-debian.htm