Install Samba File Server

How to install and setup samba file server on Debian

Install Samba Package

Run this command as root to install Samba:

apt-get install samba


The settings are located in /etc/samba/smb.conf. First configure the workgroup to which the server should belong:


## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = MyWorkGroup

Now add a directory that should be shared. List all users who should have write access.

path = /path/to/mydir
write list = user

If you would try to connect now from another machine, you would get an error message saying “access denied”. This is because the user is not configured for samba yet. So the next step is to add the user and password like this:

smbpasswd -a user

That’s it. Restart the samba server and you should have access to the files on your share.

/etc/init.d/samba restart