in This Tutorial you will Learn " How To Setup Samba Server on Rocky Linux 8.5 | Create a Private Share Directory"
Samba is a free and open-source software that can be used to share files, folders, and printers between Linux and Windows systems. It is also used for Authentication and Authorization, Name resolution and Service announcement. It can be run on different operating systems including, Linux, Unix, OpenVMS and many more.
_________________________________________________________________________________________
Server - Os: Rocky Linux 8.5 64Bit | IP -192.168.1.20 | Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
dnf install samba samba-common samba-client -y
systemctl start smb ; systemctl enable smb ; systemctl status smb
mkdir -p /samba/share/public ; touch /samba/share/public/file.txt ; touch /samba/share/public/filetwo.txt
chmod -R 0755 /samba/share/ ; chmod -R 0755 /samba/share/public ; chown -R nobody:nobody /samba/share
chown -R nobody:nobody /samba/share/public
mv /etc/samba/smb.conf /etc/samba/smb.bak ; nano /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = samba-server
security = user
map to guest = bad user
dns proxy = no
[Public]
path = /samba/share/public
browsable =yes
writable = yes
guest ok = yes
read only = no
[Private]
path = /samba/share/private
valid users = @private
guest ok = no
writable = yes
browsable = yes
systemctl restart smb
testparm
groupadd private ; useradd -g private privateuser ; smbpasswd -a privateuser
mkdir -p /samba/share/private
touch /samba/share/private/private1.txt ; touch /samba/share/private/private2.txt
chmod -R 0770 /samba/share/private ; chown -R root:private /samba/share/private
firewall-cmd --add-service=samba --zone=public --permanent ; firewall-cmd --reload
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
sestatus ; hostname ; hostname -I
Windows Machine- \\192.168.1.20 | Linux - smb://192.168.1.20 | Command-line - smbclient -L //192.168.1.20
_________________________________________________________________________________________
Thursday, February 24, 2022
How To Setup Samba Server on Rocky Linux 8.5 | Create a Private Share Directory"
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment