我试图通过遵循Ubuntu SSSD和Active Directory指南,将Ubuntu 16.04服务器加入Windows 2003 R2域。我的管理员说,从控制器方面来说,它是域的一部分。但是SSSD似乎无法启动并net ads join
失败。
该krb5.conf
由安装程序修改,现在有这个:
kyle@Server21:~$ cat /etc/krb5.conf
[libdefaults]
default_realm = COMAPNYNAME.LOCAL
在以前的安装中,我认为[realms]
在安装过程中还需要其他内容,但是我不记得是什么,这次也没有要求。
我的smb.conf
:
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = COMPANYNAME
client signing = yes
client use spnego = yes
kerberos method = secrets and keytab
realm = COMPANYNAME.LOCAL
security = ads
我的sssd.conf
:
kyle@Server21:~$ sudo cat /etc/sssd/sssd.conf
[sssd]
services = nss, pam
config_file_version = 2
domains = COMPANYNAME.LOCAL
[domain/COMPANYNAME.LOCAL]
id_provider = ad
access_provider = ad
override_homedir = /home/%d/%u
尽管SSSD服务似乎无法启动:
kyle@Server21:~$ systemctl status sssd.service
● sssd.service - System Security Services Daemon
Loaded: loaded (/lib/systemd/system/sssd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2016-06-22 09:57:57 EDT; 37min ago
Process: 16027 ExecStart=/usr/sbin/sssd -D -f (code=exited, status=1/FAILURE)
Jun 22 09:57:55 Server21 sssd[16038]: Starting up
Jun 22 09:57:55 Server21 sssd[16041]: Starting up
Jun 22 09:57:55 Server21 sssd[16042]: Starting up
Jun 22 09:57:56 Server21 sssd[be[16043]: Starting up
Jun 22 09:57:57 Server21 sssd[be[16043]: Failed to read keytab [default]: No such file or directory
Jun 22 09:57:57 Server21 sssd[16031]: Exiting the SSSD. Could not restart critical service [COMPANYNAME.LOCAL].
Jun 22 09:57:57 Server21 systemd[1]: sssd.service: Control process exited, code=exited status=1
Jun 22 09:57:57 Server21 systemd[1]: Failed to start System Security Services Daemon.
Jun 22 09:57:57 Server21 systemd[1]: sssd.service: Unit entered failed state.
Jun 22 09:57:57 Server21 systemd[1]: sssd.service: Failed with result 'exit-code'.
并且由于该指南指出所有权和权限很重要:
kyle@Server21:~$ sudo ls -la /etc/sssd
total 12
drwx--x--x 2 sssd sssd 4096 Jun 21 14:34 .
drwxr-xr-x 103 root root 4096 Jun 22 10:21 ..
-rw------- 1 root root 172 Jun 21 14:22 sssd.conf
我的nsswitch.conf
:
kyle@Server21:~$ cat /etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat sss
group: compat sss
shadow: compat sss
gshadow: files
hosts: files dns
networks: files
protocols: db files
services: db files sss
ethers: db files
rpc: db files
netgroup: nis sss
sudoers: files sss
我的hosts
:
kyle@Server21:~$ cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 Server21.COMPANYNAME.LOCAL Server21
192.168.11.11 Server21.COMPANYNAME.LOCAL Server21
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
这是麻烦开始的地方。使用sudo
运行kinit
在以下结果:
kyle@Server21:~$ sudo kinit adminstrator
kinit: Client 'adminstrator@COMPANYNAME.LOCAL' not found in Kerberos database while getting initial credentials
如果我放弃,它将进行身份验证sudo
:
kyle@Server21:~$ kinit -V administrator
Using default cache: /tmp/krb5cc_1000
Using principal: administrator@COMPANYNAME.LOCAL
Password for administrator@COMPANYNAME.LOCAL:
Authenticated to Kerberos v5
我可以验证票证:
kyle@Server21:~$ klist
Ticket cache: FILE:/tmp/krb5cc_1000
Default principal: administrator@COMPANYNAME.LOCAL
Valid starting Expires Service principal
06/23/2016 13:41:55 06/23/2016 23:41:55 krbtgt/COMPANYNAME.LOCAL@COMPANYNAME.LOCAL
renew until 06/24/2016 13:41:48
但是当我尝试加入域时:
kyle@Server21:~$ sudo net ads join -k
Failed to join domain: failed to lookup DC info for domain 'COMPANYNAME.LOCAL' over rpc: An internal error occurred.
我以前收到过NT_STATUS_UNSUCCESSFUL
指南中提到的消息,但是能够通过修改hosts
文件来解决。
该指南讨论有关验证计算机帐户是否在Active Directory中创建的问题。我的管理员说他可以看到这台机器,所以我认为还可以。第二个验证选项没有告诉我应该从该命令中得到什么,但是我什么也没收到,因此我想它不起作用。
那我在哪里错了?
编辑:
我不确定自己做了什么,但是SSSD正在运行。