Debian 7.0
Sponsored Link

Limited accessed shared directory
2013/05/12
 
Create a shared directory that requires user authentication.
[1] Configure Samba
root@lan:~#
groupadd security

root@lan:~#
mkdir /home/security

root@lan:~#
chgrp security /home/security

root@lan:~#
chmod 770 /home/security

root@lan:~#
vi /etc/samba/smb.conf
# line 103: change

security =
user
# add at the last line

[Security]  
# any name you like

   path = /home/security
   writable = yes
   create mode = 0770
   directory mode = 0770
   share modes = yes
   guest ok = no  
# guest not allowed

   valid users = @security  
# allow only security group
root@lan:~#
smbpasswd -a wheezy
 
# add a user in Samba

New SMB password:  
# set password

Retype new SMB password:
root@lan:~#
usermod -G security wheezy

root@lan:~#
/etc/init.d/samba restart

Stopping Samba daemons: nmbd smbd.
Starting Samba daemons: nmbd smbd.
[2] Configure on Windows client. This example is on Windows 7. Select [My Computer] - [Map Network Drive] like following example.
[3] Input '\\(your server)\(shared directory)'
[4] Password is required. Input the one set in [1].
[5] Just accessed.
Matched Content