在终端中输入下列命令:
root@Ubuntuserver:/home/username# nano /etc/nsswitch.conf
# /etc/nsswitch.conf
passwd: compat winbind
group: compat winbind
shadow: compat winbind
hosts: files dns wins
networks: files dns
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
保存完所有的配置之后,重启下Samba和winbind服务。
然后确保winbind正在运行,并输入下列命令:
root@ubuntuserver:/home/username# wbinfo -u
Administrator
Guest
User1
User2
root@ubuntuserver:/home/username# wbinfo -g
Domain Admins
Sales
HR
Helpdesk Stuff
你也可以通过输入下列命令来查看域控制器的信息:
root@ubuntuserver:/home/username# net ads info
LDAP server: 192.168.x.x
LDAP server name: yourdomaincontroller.example.net
Realm: EXAMPLE.NET
Bind Path: dc=EXAMPLE, dc=NET
LDAP port: 389
Server time: tHU, 06 aUG 2009 15:36:46 EST
KDC server: 192.168.x.x
Server time offset: 1
root@ubuntuserver:/home/username#
教程结束,希望对你有帮助。