Samba : Restricted Shared Folder2019/01/23 |
Install Samba to build a File Server.
For example, Create a shared Folder which requires user authentication.
|
|
[1] | Install and Configure Samba. |
smb:~ #
smb:~ # zypper -n install samba samba-client 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 # any Share name you like [Security] path = /home/security writable = yes create mode = 0770 directory mode = 0770 # not allow guest user guest ok = no # allow only security group valid users = @security # 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 |
[2] | If Firewalld is running, allow Samba service. |
smb:~ # firewall-cmd --add-service=samba --permanent success smb:~ # firewall-cmd --reload success |
[3] | It's the way to access to the shared folder. This example is on Windows 10. Select [Computer] - [network] - [Map Network Drive]. |
[4] | Specify the shared folder's place in Folder section and Click the [Finish] button to enter. |
[5] | Authentication is required, Input the username and password you added in Samba. |
[6] | Just accessed. |
Sponsored Link |
|