cat >/etc/samba/smb.conf <<DELIM
[global]
workgroup = WORKGROUP
netbios name = SAMBA
dns proxy = no
## disable printing
disable spoolss = yes
load printers = no
printing = bsd
printcap name = /dev/null
security = user
## DO NOT MODIFY `Bad User` if you neeq anonymous share
map to guest = Bad User
guest account = nobody
## debug
# log level = 4
# debug timestamp = yes
allow insecure wide links = yes
[share]
comment = Readonly Share
path = /opt/share
guest ok = yes
read only = yes
write list = +zhong
follow symlinks = yes
wide links = yes
[upload]
comment = Anonymous Upload Service
path = /opt/share/upload
available = yes
browsable = yes
public = yes
guest ok = yes
writeable = yes
DELIM
Links
smb.conf
smbpasswd
smbpasswd -a zhong