当我通过 smbclient 连接 samba 服务器时,出现如下错误
smbclient //192.168.1.56/smbshare -U sakshi
Unknown parameter encountered: "ldap machine suffix ou"
Ignoring unknown parameter "ldap machine suffix ou"
Enter sakshi's password:
Receiving SMB: Server stopped responding
session setup failed: Call timed out: server did not respond after 20000 milliseconds
你好,我在 Samba 配置中遇到了一些问题,我的配置如下
我的 testparm 输出是:-
Load smb config files from /etc/samba/smb.conf
Unknown parameter encountered: "ldap machine suffix ou"
Ignoring unknown parameter "ldap machine suffix ou"
Processing section "[smbshare]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = OPENLDAP
server string = %h server (Samba, Ubuntu)
map to guest = Bad User
passdb backend = ldapsam:ldap://openldap.server
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
add machine script = sudo /usr/sbin/smbldap-userad -t 0 -w "%u"
dns proxy = No
ldap admin dn = cn=admin,dc=openldap,dc=server
ldap group suffix = ou=Groups
ldap idmap suffix = ou=idmap
ldap passwd sync = yes
ldap suffix = dc=openldap,dc=server
ldap ssl = no
ldap user suffix = ou=People
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
[smbshare]
comment = for ldap user
path = /test
valid users = sakshi
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
我的 smbd 输出是
[2011/04/04 17:08:43, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 12 try!
[2011/04/04 17:08:44, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 13 try!
[2011/04/04 17:08:45, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 14 try!
[2011/04/04 17:08:46, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 15 try!
[2011/04/04 17:08:47, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 1 try!
[2011/04/04 17:08:48, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 2 try!
[2011/04/04 17:08:49, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 3 try!
[2011/04/04 17:08:50, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 4 try!
[2011/04/04 17:08:51, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 5 try!
[2011/04/04 17:08:52, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 6 try!
[2011/04/04 17:08:53, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 7 try!
[2011/04/04 17:08:54, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 8 try!
[2011/04/04 17:08:55, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 9 try!
[2011/04/04 17:08:56, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 10 try!
[2011/04/04 17:08:57, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 11 try!
[2011/04/04 17:08:58, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 12 try!
[2011/04/04 17:08:59, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 13 try!
[2011/04/04 17:09:00, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 14 try!
[2011/04/04 17:09:01, 1] lib/smbldap.c:another_ldap_try(1175)
Connection to LDAP server failed for the 15
更新
我像这样更改了我的机器后缀:ldap machine suffix = ou=Computer
但我仍然遇到问题。
我在 Ubuntu 平台上的一个系统上配置了 samba+ldap,现在我可以通过 Microsoft 端访问 samba 共享,但仍然收到此错误:
[2011/04/07 17:15:21, 1] lib/smbldap.c:another_ldap_try(1175) Connection to LDAP server failed for the 6 try! [2011/04/07 17:15:22, 1] lib/smbldap.c:another_ldap_try(1175) Connection to LDAP server failed for the 7 try!
[2011/04/07 17:15:23, 1] lib/smbldap.c:another_ldap_try(1175) Connection to LDAP server failed for the 8 try!
答案1
首先,你的 smb.conf 中有一行如下内容:
ldap machine suffix ou=machines
或类似内容。它必须看起来像这样,并带有一个附加=
字符:
ldap machine suffix = ou=machines
那么看起来您的 LDAP 服务器要么没有运行,要么配置不正确,这是主要问题。您启动它了吗?您在什么平台上运行,使用哪个版本的 samba,什么类型的 LDAP 服务器等等?