Tuesday, October 8, 2013

Debian Wheezy 7.1: quick samba setup

From command line

apt-get install samba smbclient


during installation, it performs default configuration
after....
 
adduser guest --home=/home/public --shell=/bin/false --disabled-password

to create a guest user to use only as samba default user...

chmod -R 0700 /home/public
chown -R guest.guest /home/public
 
These commands configure the sharing in way of every user can create a content(file or folder)
into the shared folder.
No one may edit the content created by someone others.... 
If you want some of differently, change the permission mask.....
Now edit /etc/samba/smb.conf
adding after the row obey pam restrictions = yes
 
insert these rows: 
 
guest account = guest
invalid users = root

 
and in the *Authentication* section,  this row.....: 
 
security = share

In the sharing section add:
# SHARED DIR
[shared]
   comment = shared
   read only = no
   path = /home/public
   guest ok = yes
   guest only = yes
   create mask = 0600
   directory mask = 0700

 
Fine...... restart samba:
 /etc/init.d/samba restart

and all is done.....

Bye...

No comments:

Post a Comment