Server

Server Setup
yum install samba samba-common samba-client -y

getsebool -a | grep samba

setsebool -P samba_export_all_ro=1 samba_export_all_rw=1 samba_share_nfs=1

mkdir /sambashare
mkdir /sambagroupshare

semanage fcontext -at samba_share_t "/sambashare(/.*)?"
semanage fcontext -at samba_share_t "/sambagroupshare(/.*)?"

restorecon -Rv /sambashare/
restorecon -Rv /sambagroupshare/

ls -Zd /sambashare/ /sambagroupshare/

firewall-cmd --state

firewall-cmd --permanent --add-service=samba

firewall-cmd --reload

cd /etc/samba

cp smb.conf smb.conf.original

vim smb.conf:

[global]
  workgroup       = WORKGROUP
  hosts allow     = 127. 10.
  passdb backend  = smbpasswd
  security        = user
[sambashare]
  browsable       = yes
  path            = /sambashare
  public          = yes
  write list      = user1
  writable        = no
  valid users     = user1
[smbgroup]
  browsable       = yes
  path            = /sambagroupshare
  public          = no
  valid users     = @smbgroup
  write list      = @smbgroup
  force group     = @smbgroup
  create mask     = 0770

testparm

groupadd smbgroup -g 1337

adduser -G smbgroup -u 1004 user1

smbpasswd -a user1

cat /var/lib/samba/private/smbpasswd

pdbedit -Lv

systemctl enable smb nmb

systemctl start smb nmb

smbclient -L //localhost -U user1