samba设置问题

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
hb19860307
帖子: 14
注册时间: 2008-10-19 21:27
送出感谢: 0
接收感谢: 0

samba设置问题

#1

帖子 hb19860307 » 2008-12-18 19:21

smb.conf
[global]

workgroup = WORKGROUP

server string = %h server (Samba, Ubuntu)

; wins support = no

; wins server = w.x.y.z

dns proxy = no

; name resolve order = lmhosts host wins bcast

#### Networking ####

; interfaces = 127.0.0.0/8 eth0

; bind interfaces only = true



#### Debugging/Accounting ####

log file = /var/log/samba/log.%m

max log size = 1000

; syslog only = no

syslog = 0

panic action = /usr/share/samba/panic-action %d


security = user

passdb backend = tdbsam

obey pam restrictions = yes

;guest account = test

;invalid users = root

unix password sync = yes

passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

pam password change = yes

map to guest = Never

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = yes
read only = yes
create mask = 0700

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = yes

[TEST]
comment = TEST
browseable = yes
path=/var/test
read only = yes
valid users = test,@test





这样设置TEST文件夹需要登录test帐户才能进,但是我将安全级别改为share(security = share)后,TEST文件夹就进不去了,加了Guest = ok也不行,请大侠们看看我哪设置错了,谢谢指教
hb19860307
帖子: 14
注册时间: 2008-10-19 21:27
送出感谢: 0
接收感谢: 0

Re: samba设置问题

#2

帖子 hb19860307 » 2008-12-18 19:23

就是即使输入正确的test帐户密码也进不去,权限设置的也正确,还有guest account = XXX 这个是干什么的?输入正确的帐户密码后分配的系统帐户吗?
头像
xiangmin911
帖子: 27
注册时间: 2008-06-07 0:59
送出感谢: 0
接收感谢: 0
联系:

Re: samba设置问题

#3

帖子 xiangmin911 » 2008-12-22 20:40

guest account是设置你的来宾帐户的,注意你的smb.conf配置文档的这一行, ;guest account=test,这一行的前面加入了分号;,这是起注释作用,是不起作用的,所以你要使用来宾用户来访问你的服务器,就要把这个分号取消,即guest account=test
头像
xiangmin911
帖子: 27
注册时间: 2008-06-07 0:59
送出感谢: 0
接收感谢: 0
联系:

Re: samba设置问题

#4

帖子 xiangmin911 » 2008-12-22 20:53

另外如果你使用是的用户模式的话,还要在服务器上建立test的本地帐户,sudo useradd test,然后sudo smbpasswd -a test,设置你使用test帐户登录samba服务器的密码,然后就输入用户名和密码就可以访问了,如果设置为security=share后,要使用来宾用户访问的话,还需要在你的[TEST]节下加入guest ok=yes
回复

回到 “服务器基础应用”