How to install and configure SAMBA on Debian Squeeze

sudo apt-get install libcupsys2 samba samba-common

Workgroup/domain name:

WORKGROUP


 * 1) vi /etc/samba/smb.conf

activate line security = user, to enable linux system users to access samba [...] security = user [...]
 * 1) “security = user” is always a good idea. This will require a Unix account
 * 2) in this server for every user accessing the server. See
 * 3) /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
 * 4) in the samba-doc package for details.

/etc/init.d/samba restart

Add samba shares for "allusers"

mkdir -p /home/samba-share/allusers chown -R root:users /home/samba-share/allusers/ chmod -R ug+rwx,o+rx-w /home/samba-share/allusers/


 * 1) vi /etc/samba/smb.conf

[allusers] comment = All Users path = /home/samba-share/allusers valid users = @users force group = users create mask = 0660 directory mask = 0771 writable = yes

If you want all users to be able to read and write to their home directories via Samba

[...] [homes] comment = Home Directories browseable = no valid users = @users writable = yes create mask = 0700 directory mask = 0700


 * 1) /etc/init.d/samba restart

read only = no
 * By default, the home directories are exported read-only. Change the# next parameter to 'no' if you want to be able to write to them.

Add and menage samba users:

useradd samba-user -m -G users

Set user password:

passwd samba-user

Add samba user to database:

smbpasswd -a samba-user