티스토리 뷰

Debian 6 Samba Server Limited dir


Create a Limited directory

  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 2770 /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 squeeze # add a user in Samba

New SMB password:# set password

Retype new SMB password:

root@lan:~# vi /etc/group 


# add

security:x:1001:squeeze


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

Stopping Samba daemons: nmbd smbd.

Starting Samba daemons: nmbd smbd.


※ Next manual


저작자 표시 비영리 변경 금지
신고
댓글