分类: LINUX
2013-07-05 10:12:45
[global]
workgroup = WORKGROUP (自己设置的工作组)
display charset = UTF-8 (放置编码不一致)
unix charset = UTF-8
dos charset = cp936
security = user (user是要用户验证的 share的话不用验证)
passdb backend = tdbsam
#smb passwd file = /etc/samba/smbpasswd
guest ok = no
server string = abc(Samba,Ubuntu)
[duocai] (共享的目录名称)
path = /home/duocai (共享的路径)
comment = shared directory for top1 android
writable = yes
browsable = yes
read only = yes
public = yes
available = yes
valid users = duocai,user1 (进入这个共享目录的 用户)
#invalid users = root
[top2]
path = /home/top2
comment = shared directory for top2 android
writable = yes
browseable = yes
read only = no
public = yes
available = yes
valid users = root,user2
#invalid users = root
配置多路径的 可以更改下配置就OK
# useradd user2
# smbpasswd -a user2
# service smb restart
=================================================================
以下的这个配置是不需要登录验证就OK
[global]
security = share
guest account = nobody
guest ok = yes
[share]
comment = For tmp files, please
path = /home/www
#read only = no
#valid users=root
writeable=yes
public = yes
guest ok = yes
create mask = 1600
#directory mask= 1700
[global]
security = share
guest account = nobody
guest ok = yes
[share]
comment = For tmp files, please
path = /home/www
#read only = no
#valid users=root
writeable=yes
public = yes
guest ok = yes
create mask = 1600
#directory mask= 1700