Fedora 14
Sponsored Link

Create a Limited directory
2010/11/05
  Create a shared directory that requires user authentication.

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

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

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

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

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


# line 119: change ( require auth )

security =
user


# add at the bottom

[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@lan03 ~]#
/etc/rc.d/init.d/smb restart

Shutting down SMB services:
[  OK  ]

Starting SMB services:
[  OK  ]

[root@lan03 ~]#
smbpasswd -a fedora
# add a user in Samba

New SMB password:
# set password

Retype new SMB password:
# verify

Added user fedora.
[root@lan03 ~]#
vi /etc/group


security:x:502:
fedora
# add
[2] Configure on Windows client. This example is on Windows 7. Select [My Computer] - [Map Network Drive] like following example.
 
[3] Input '\\(server)\(shared directory)'
 
[4] Password is required. Input the one set in [1].
 
[5] Just accessed.
 
Matched Content
 
Tweet