티스토리 뷰

EN/Fedora 18

Fedora 18 Samba Server Limited Dir

ServerWorld 2016.04.23 18:30

Fedora 18 Samba Server Limited Dir

 

Create a Limited Shared directory
  
Create a shared directory that requires user authentication.
For example, create a group "security" and configure Samba that users in "security" group can access to a limited folder with authentication.

 

1. Configure Samba

 

[root@otaec ~]# groupadd security

 

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

 

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

 

[root@otaec ~]# chmod 770 /home/security

 

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

# near line 68: add ( enable SMB2 )
max protocol = SMB2

# line 125: 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@otaec ~]# systemctl restart smb.service

 

[root@otaec ~]# smbpasswd -a fedora # add smb user
New SMB password:# set password
Retype new SMB password:# confirm
Added user fedora.

[root@otaec ~]# usermod -G security fedora

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