Samba Server Install on Debian 7 (Wheezy) - Page 2

3. Secured samba server

For this I will create a group smbgrp & user srijan to access the samba server with proper authentication

groupadd smbgrp

useradd srijan -G smbgrp

smbpasswd -a srijan

[email protected]:/samba# smbpasswd -a srijan
New SMB password:
Retype new SMB password:
Added user srijan.
[email protected]:/samba#

Now create the folder viz secured in the /samba folder & give permissions like this

mkdir -p /samba/secured
cd /samba
chmod -R 0770 secured/

Again edit the configuration file as :

vi /etc/samba/smb.conf

 path = /samba/secured
 valid users = @smbgrp
 guest ok = no
 writable = yes
 browsable = yes

service samba restart 

Further to cross-check the settings check as follows:

[email protected]:~# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[Anonymous]"
Processing section "[secured]"
Loaded services file OK.
Press enter to see a dump of your service definitions

Now at windows machine check the folder now with the proper credentials

You will again face the issue of permissions to give write permission to the user srijan do:

cd /samba
chown -R srijan:smbgrp secured/

Now samba user srijan  have permissions to write in the folder. Cheers you have done with samba server in Debian7.

Share this page:

0 Comment(s)

Add comment


From: howtoforge