This is a minimal Samba setup to let other machines access files on a Debian machine.
apt-get install samba
apt-get install samba-client
Edit the Samba configuration file.
vi /etc/samba/smb.conf
In the global section, check the name of the workgroup. It might be useful to know it when you'll try to connect from a Windows machine:
[global]
...
workgroup = STURBAIN
Locate the home share definition:
[homes]
In that section you may enable read-write access to the home directories:
read only = no
To share files in some other path on the system, add another share definition such as:
[ourfiles]
comment = Some useful files
read only = no
locking = no
path = /path_to_our_files
guest ok = no
Samba uses it's own password system so users need to be added by root. Note that the users have to exist in /etc/passwd
smbpasswd -a me
smbpasswd -a you
You will be prompted for a password for each of those users.
pdbedit -w -L
Restart the Samba daemon
/usr/sbin/service smbd restart
Try to access the shares (as a normal user)
Try locally first, then from another machine on the network which also installed samba client. When prompted, use the password entered when adding the user to Samba.
smbclient //ourmachine/me
smbclient -U you //ourmachine/you
smbclient //ourmachine/ourfiles
apt-get install cifs-utils
Edit '''/etc/fstab''' as '''root'''
add this line
<IP address of NAS box 192.168.x.y>/<shared folder> /<mount point> cifs user=<user on NAS>,pass=<passwd on NAS> 0 0