[root@sg ~]# cat /etc/samba/smb.conf | grep -vE "^\s*#|^\s*;|^\s*$"
[global]
workgroup = WORKGROUP
server string = Samba Server Version %v
security = user
passdb backend = tdbsam
load printers = no
cups options = raw
printing = bsd
printcap name = /dev/null
[design]
comment = Network Logon Service
path = /mnt/data/design
guest ok = yes
valid users = design
browseable=no
writable = yes
[qa]
comment = qa packages
path = /mnt/data2/qa
guest ok = yes
valid users = qa
browseable = no
writable = yes
[qa_read]
comment = qa packages
path = /mnt/data2/qa
valid users = q
guest ok = yes
browseable = no
read only = yes
[release]
comment = packages
path = /mnt/data2/qa/release
valid users = cs
guest ok = yes
browseable = no
read only = yes
[market]
comment = market doc
path = /mnt/data2/market
guest ok = yes
valid users = market
browseable = no
writable = yes
useradd -s /sbin/nologin market
smbpasswd -a market
输入密码
mkdir -p /mnt/data2/market
chown -R market.market /mnt/data2/market
/etc/init.d/smb restart
原文地址:http://blog.51cto.com/chaoyuezhangsan/2104754