Samba/Winbind 问题加入 Active Directory 域

Samba/Winbind 问题加入 Active Directory 域

我目前正在设置 winbind/samba 并遇到一些问题。

我可以使用 wbinfo 很好地测试连通性:

[root@buildmirror ~]# wbinfo -u
hostname     username
administrator
guest
krbtgt
username


[root@buildmirror ~]# wbinfo -a username%password
plaintext password authentication succeeded
challenge/response password authentication succeeded

但是当我执行 getent 时,没有返回任何 AD 帐户

[root@buildmirror ~]# getent passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
puppet:x:52:52:Puppet:/var/lib/puppet:/sbin/nologin

我的 nsswitch 如下所示:

passwd:     files winbind
shadow:     files winbind
group:      files winbind

#hosts:     db files nisplus nis dns
hosts:      files dns

并且我肯定已经加入了该域:

[root@buildmirror ~]# net ads info
LDAP server: 192.168.4.4
LDAP server name: pdc.domain.local
Realm: domain.local
Bind Path: dc=DOMAIN,dc=LOCAL
LDAP port: 389
Server time: Sun, 05 Aug 2012 17:11:27 BST
KDC server: 192.168.4.4
Server time offset: -1

那么我遗漏了什么?

答案1

/etc/samba/smb.conf 中是否有以下行?

winbind enum users = yes
winbind enum groups = yes

答案2

getent 默认不显示域用户。但是,您可以一次为已知 AD 用户使用一个用户名:getent passwd mydomainuser

如果您无法以用户身份登录,请确保您的 pam 文件设置正确。在 Ubuntu(也许是 Debian?)上,最简单的方法是使用命令 pam-auth-update 在 RH/Fedora 上,使用 authconfig-tui 命令。

相关内容