Samba
yum install samba samba-client -y
firewall-cmd —permanent —add-service=samba
firewall-cmd —reload
useradd -s /sbin/nologin cody
useradd -s /sbin/nologin serviceteam
smbpasswd -a cody
smbpasswd -a serviceteam
mkdir /test
mkdir /serviceteam
man semanage - fontext
semanage fcontext -a -t samba_share_t “/test(/.*)?”
semanage fcontext -a -t samba_share_t “/serviceteam(/.*)?”
restorecon -R -v /test/
Rewstorecon -R -v /serviceteam
vi /etc/samba/smb.conf
[ test]
path = /test
browseable =yes
guest ok = no
writable =no
valid users = cody
write list = cody
chown cody /test/
systemctl enable smb.service nmb.service
systemctl start smb.service nmb.service
Test
smbclient //server1/test -U cody
mkdir abc