CentOS 5
Create a Limited directory
  Create a shared directory that requires user authentication.

[1] Configure Samba
[root@master ~]#
groupadd security

[root@master ~]#
mkdir /home/security

[root@master ~]#
chgrp security /home/security

[root@master ~]#
chmod 2770 /home/security

[root@master ~]#
vi /etc/samba/smb.conf


# line 102: change

security =
user


# add at the bottom

[Security]
# specify any name

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

   valid users = @security
# allow only security group


[root@master ~]#
/etc/rc.d/init.d/smb restart

Shutting down SMB services:
[  OK  ]

Shutting down NMB services:
[  OK  ]

Starting SMB services:
[  OK  ]

Starting NMB services:
[  OK  ]

[root@master ~]#
smbpasswd -a cent
# add user

New SMB password:
# set password

Retype new SMB password:
# verify

Added user cent.
[root@master ~]#
vi /etc/group


security:x:502:
cent
# add
[2] Configure on Windows client. Open [My Computer] -[Map Network Drive] .
 
[3] Input shared folder's place.
 
[4] Login Password is required. Input it set in section [1].
 
[5] Done to access.