Fedora 22
Sponsored Link

Limited accessed shared Folder2015/06/03

 
Install Samba to build a File Server.
For example, Create a shared Folder which requires user authentication.
[1] Install and Configure Samba.
[root@smb ~]#
dnf -y install samba samba-client
[root@smb ~]#
groupadd security

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

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

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

[root@smb ~]#
vi /etc/samba/smb.conf
# near line 66: add follows

unix charset = UTF-8
# line 90: change (Windows' default)

workgroup =
WORKGROUP
# line 96: uncomment and change IP address you allow

hosts allow = 127.
10.0.0.
# add follows 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
[root@smb ~]#
systemctl start smb

[root@smb ~]#
systemctl start nmb

[root@smb ~]#
systemctl enable smb

[root@smb ~]#
systemctl enable nmb
# add a user in Samba

[root@smb ~]#
smbpasswd -a fedora

New SMB password:
# set password

Retype new SMB password:
# confirm

Added user fedora.
[root@smb ~]#
usermod -G security fedora

[2] It's the way to access to the shared folder. This example is on Windows 8.1.
Select [Computer] - [Map Network Drive].
[3] Specify the shared folder's place in Folder section and Click the 'Finish' button to enter.
[4] Authentication is required, Input the username and password you added in Samba.
[5] Just accessed.
Matched Content