1. installation

yum -y install samba samba-client

2. configuration

vi /etc/samba/smb.conf
#
# 14jan2016: initial version (ary)

[global]
        workgroup = D01
        server string = %h (samba server %v)
        bind interfaces only = yes
      # interfaces = lo eth0
        log level = 0
        log file = /var/log/samba/log.%m
        max log size = 50
        printing = bsd

[d01]
        comment = d01 share
        path = /data1/d01/
        read only = yes
        browseable = yes
        force user = root
        force group = smbgroup
        write list = @smbgroup
        create mask = 0660
        directory mask = 0770
        force create mode = 0660
        force directory mode = 0770
      # vfs objects = audit
groupadd smbgroup
useradd -G smbgroup cidusr
echo "cidusr:Passw0rd" | chpasswd
echo "Passw0rd" > /tmp/pwd
echo "Passw0rd" >> /tmp/pwd
smbpasswd -a "cidusr" -s < /tmp/pwd
rm -f /tmp/pwd
mkdir -p /data1/d01
systemctl enable smb.service
systemctl restart smb.service