티스토리 뷰

OpenSUSE 11 Samba Server Limited accessed shared Folder


Limited accessed shared Folder

 

Install Samba to build a File Server.

For example, Create a shared Folder which requires user authentication.



1. Install and Configure Samba.


smb:~ # zypper -n install samba samba-client

smb:~ # groupadd security 


smb:~ # mkdir /home/security 


smb:~ # chgrp security /home/security 

smb:~ # chmod 770 /home/security 


smb:~ # vi /etc/samba/smb.conf

# line 5: add

unix charset = UTF-8


# line 13: comment out

#map to guest = Bad User

# add to the end

[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


smb:~ # /etc/init.d/smb start 

smb:~ # /etc/init.d/nmb start 


smb:~ # chkconfig smb on 

smb:~ # chkconfig nmb on


# add a user in Samba

smb:~ # smbpasswd -a suse 

New SMB password:     # set password

Retype new SMB password:

Added user suse.


smb:~ # usermod -G security suse 

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