[root@centos]# yum install samba samba-client samba-common
[root@centos]# systemctl enable nmb smb
[root@centos]# adduser jhones
[root@centos]# passwd jhones
[root@centos]# groupadd samba
[root@centos]# usermod jhones -aG samba
[root@centos]# chmod 0770 /storage/
[root@centos]# chown root.samba /storage/
[root@centos]# vim /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
map to guest = bad user
printing = cups
printcap name = cups
load printers = yes
cups options = raw
#[homes]
# comment = Home Directories
# valid users = %S, %D%w%S
# browseable = No
# read only = No
# inherit acls = Yes
#[print$]
# comment = Printer Drivers
# path = /var/lib/samba/drivers
# write list = root
# create mask = 0664
# directory mask = 0775
[opt]
path = /opt
valid users = root
guest ok = no
writable = yes
browsable = yes
create mask = 666
directory mask = 777
force directory mode = 0777
force create mode = 0777
[storage]
path = /storage
valid users = @samba
guest ok = no
writable = yes
browsable = yes
create mask = 666
directory mask = 777
force directory mode = 0777
force create mode = 0777
[root@centos]# systemctl start nmb smb
[root@centos]# smbpasswd -a jhones
[root@centos]# testparm