在rhel7服务器上,我尝试将服务器join到域中,但是出现以下故障:
net ads join -S domain.example.org -U name Enter name's password: Failed to join domain: failed to set machine kerberos encryption types: Insufficient access
与pam,krb5,samba,dns以及远程活动目录服务器中的对象相关的设置configuration正确,这意味着系统将使用rhel6和ubuntu 14.04成功绑定。
我无法find关于我得到的具体错误的很多信息。 我试图在krb5.conf中设置allow_weak_crypto = true来查看它是否与此有关,但是没有任何作用。
我遵循https://technet.microsoft.com/en-us/library/bb463167.aspx中的一些故障排除技巧,但没有运气,我尝试的东西似乎正常工作。
具体来说,我可以做到以下几点,这意味着我可以获得用户名的初始凭证:
kinit name Password for [email protected]:
我也能够使用ktutil生成一个keytab文件,当我将它移动到/etc/krb5.keytab klist -e时,它显示正确的内容。 但是, networking广告join失败。
编辑:检查rhel7桑巴源包后,我在README.dc中find以下内容 :
一旦支持MIT Kerberos KDC,我们将立即提供Samba AD DCfunction。
我怀疑可能是这个问题,我不得不等待,直到准备就绪。
编辑2:使用领域和sssd而是似乎有相同的问题。 做完之后:
realm -v join --user=example ad.example.org
我发现以下错误:
* LANG=C /usr/sbin/adcli join --verbose --domain ad.example.org --domain-realm AD.EXAMPLE.ORG --domain-controller 192.0.2.11 --login-type user --login-user example --stdin-password ! Insufficient permissions to set encryption types on computer account: CN=example,OU=w,OU=x,DC=ad,DC=example,DC=org: 00002098: SecErr: DSID-03150BB9, problem 4003 (INSUFF_ACCESS_RIGHTS), data 0
请注意,这与rhel6。 我也没有权限更改AD服务器或我的帐户。
rhel版本是7.2,相关的软件包有以下版本:
Name : realmd Version : 0.16.1 -- Name : adcli Version : 0.7.5 -- Name : krb5-workstation Version : 1.13.2 -- Name : samba-common Version : 4.2.3
journalctl的消毒输出-e SYSLOG_IDENTIFIER = realmd :
Jan 21 14:56:20 host.example.org realmd[25796]: * Using domain name: example.org Jan 21 14:56:20 host.example.org realmd[25796]: * Using computer account name: HOST Jan 21 14:56:20 host.example.org realmd[25796]: * Using domain realm: example.org Jan 21 14:56:20 host.example.org realmd[25796]: * Calculated computer account name from fqdn: HOST Jan 21 14:56:20 host.example.org realmd[25796]: * Generated 120 character computer password Jan 21 14:56:20 host.example.org realmd[25796]: * Using keytab: FILE:/etc/krb5.keytab Jan 21 14:56:20 host.example.org realmd[25796]: * Using fully qualified name: host.example.org Jan 21 14:56:20 host.example.org realmd[25796]: * Using domain name: example.org Jan 21 14:56:20 host.example.org realmd[25796]: * Using computer account name: HOST Jan 21 14:56:20 host.example.org realmd[25796]: * Using domain realm: example.org Jan 21 14:56:20 host.example.org realmd[25796]: * Looked up short domain name: AD Jan 21 14:56:20 host.example.org realmd[25796]: * Found computer account for HOST$ at: CN=host,OU=w,OU=x,DC=ad,DC=example,DC=org Jan 21 14:56:20 host.example.org realmd[25796]: * Set computer password Jan 21 14:56:20 host.example.org realmd[25796]: * Retrieved kvno '87' for computer account in directory: CN=host,OU=w,OU=x,DC=ad,DC=example,DC=org Jan 21 14:56:20 host.example.org realmd[25796]: ! Insufficient permissions to set encryption types on computer account: CN=host,OU=w,OU=x,DC=ad,DC=example,DC=org: 00002098: SecErr: DSID-03150BB9, problem 4003 (INSUFF_ACCESS_RIGHTS), Jan 21 14:56:20 host.example.org realmd[25796]: * Modifying computer account: userAccountControl Jan 21 14:56:20 host.example.org realmd[25796]: * Modifying computer account: operatingSystem, operatingSystemVersion, operatingSystemServicePack Jan 21 14:56:20 host.example.org realmd[25796]: ! Couldn't set operatingSystem, operatingSystemVersion, operatingSystemServicePack on computer account: CN=host,OU=w,OU=x,DC=ad,DC=example,DC=org: Insufficient access Jan 21 14:56:20 host.example.org realmd[25796]: * Updated existing computer account: CN=host,OU=w,OU=x,DC=ad,DC=example,DC=org Jan 21 14:56:20 host.example.org realmd[25796]: * Discovered which keytab salt to use Jan 21 14:56:20 host.example.org realmd[25796]: * Added the entries to the keytab: [email protected]: FILE:/etc/krb5.keytab Jan 21 14:56:20 host.example.org realmd[25796]: * Added the entries to the keytab: HOST/[email protected]: FILE:/etc/krb5.keytab Jan 21 14:56:20 host.example.org realmd[25796]: * Added the entries to the keytab: HOST/[email protected]: FILE:/etc/krb5.keytab Jan 21 14:56:21 host.example.org realmd[25796]: * Added the entries to the keytab: RestrictedKrbHost/[email protected]: FILE:/etc/krb5.keytab Jan 21 14:56:21 host.example.org realmd[25796]: * Added the entries to the keytab: RestrictedKrbHost/[email protected]: FILE:/etc/krb5.keytab Jan 21 14:56:21 host.example.org realmd[25796]: process exited: 25879 Jan 21 14:56:21 host.example.org realmd[25796]: * /usr/bin/systemctl enable sssd.service Jan 21 14:56:21 host.example.org realmd[25796]: process started: 25880 Jan 21 14:56:21 host.example.org realmd[25796]: Created symlink from /etc/systemd/system/multi-user.target.wants/sssd.service to /usr/lib/systemd/system/sssd.service. Jan 21 14:56:21 host.example.org realmd[25796]: process exited: 25880 Jan 21 14:56:21 host.example.org realmd[25796]: * /usr/bin/systemctl restart sssd.service Jan 21 14:56:21 host.example.org realmd[25796]: process started: 25894 Jan 21 14:56:22 host.example.org realmd[25796]: process exited: 25894 Jan 21 14:56:22 host.example.org realmd[25796]: * /usr/bin/sh -c /usr/sbin/authconfig --update --enablesssd --enablesssdauth --enablemkhomedir --nostart && /usr/bin/systemctl enable oddjobd.service && /usr/bin/systemctl start oddjobd.se Jan 21 14:56:22 host.example.org realmd[25796]: process started: 25901 Jan 21 14:56:23 host.example.org realmd[25796]: process exited: 25901 Jan 21 14:56:23 host.example.org realmd[25796]: * Successfully enrolled machine in realm Jan 21 14:56:23 host.example.org realmd[25796]: released daemon: current-invocation Jan 21 14:56:23 host.example.org realmd[25796]: client gone away: :1.3100 Jan 21 14:56:23 host.example.org realmd[25796]: released daemon: :1.3100 Jan 21 14:57:23 host.example.org realmd[25796]: quitting realmd service after timeout Jan 21 14:57:23 host.example.org realmd[25796]: stopping service
networking广告净化输出-P状态 :
objectClass: top objectClass: person objectClass: organizationalPerson objectClass: user objectClass: computer cn: host distinguishedName: CN=host,OU=w,OU=x,DC=ad,DC=example,DC=org instanceType: 4 whenCreated: 2012 whenChanged: 2016 uSNCreated: 1687590 memberOf: CN=group,OU=groups,OU=w,DC=ad,DC=example,DC=org uSNChanged: 1212121212 name: host objectGUID: x userAccountControl: 6 badPwdCount: 0 codePage: 0 countryCode: 0 badPasswordTime: 1 lastLogoff: 0 lastLogon: 1 localPolicyFlags: 0 pwdLastSet: 1 primaryGroupID: 600 objectSid: S-1-5-21 accountExpires: 9 logonCount: 1 sAMAccountName: HOST$ sAMAccountType: 8 dNSHostName: host.ad.example.org servicePrincipalName: RestrictedKrbHost/HOST servicePrincipalName: RestrictedKrbHost/host.ad.example.org servicePrincipalName: HOST/host.ad.example.org servicePrincipalName: HOST/HOST objectCategory: CN=Computer,CN=Schema,CN=Configuration,DC=ad,DC=example,DC=org isCriticalSystemObject: FALSE dSCorePropagationData: 2 dSCorePropagationData: 3 dSCorePropagationData: 4 dSCorePropagationData: 5 dSCorePropagationData: 6 lastLogonTimestamp: 1
你为什么使用networking? 您应该使用samba-tooljoin域
samba-tool domain join domain.example.org DC -Uadministrator --realm=domain.example.org
除了股票和一些其他的东西,networking已经不再被用于桑巴4了。
不要乱用Kerberos密码设置。
我有同样的问题, realm加adcli是解决scheme。 realm默认使用samba-common后端。 获取realmd和adcli包,然后使用
# realm join --membership-software=adcli -U <username> <domain>
你甚至adcli直接使用adcli 。 请注意,发生相同的权限错误,但您继续join域,而不是在encryptiontypes拒绝时失败。
这让我连续数周。 这个项目最终拖延了,直到我弄明白了。 从我的痛苦中学习。
不幸的是,据我所知adcli似乎没有任何方法来validation连接,而不更改AD。 要validation,你可以备份/etc/samba/smb.conf并用(只)replace它:
realm = <REALM> workgroup = <WORKGROUP>
然后运行net ads -P status ,从AD获取大量有关您新登记的计算机帐户的信息。 您可以使用ldapsearch对DC进行相同的操作,通过使用Windows工具进行search,或者通过询问您的ADpipe理员,但是我不知道LDAP使用哪些选项,并且我喜欢自给自足。
adcli / net常常会注册一台机器,但sssd_ad并不适用于开箱即用的身份pipe理。 特别是在RIDS超过20万的企业级AD环境中,或者从几个较旧版本多次更新的问题,通常会出现问题。 如果您从net ads status命令获得结果,但仍无法获取用户信息,请使用sssd和sssd_ad查找问题。 systemctl status sssd.service是一个很好的开始。 但是,我想映射和身份validation的故障排除sssd_ad不在您的原始问题的范围内。
额外的信用读数:
Docs for freedesktop.org上的领域 。
在freedesktop.org上的adcli文档 。
手册页为sssd_ad
在samba从4.1升级到4.3版本之后,debian和ubuntu上也出现这个问题。 这意味着它不是特定的redhat。 另外我也联系了redhat支持。
我找不到解决办法,但是我find了一个足够好的工作。 出于某种原因,当发生特定故障时,不会创build密钥表或创build不正确的密钥表。 绑定到活动目录服务器实际上是成功的,并使事情工作一个新的密钥表需要被创build。
无法join域:未能设置机器Kerberosencryptiontypes:访问不足
运行这个来创buildkeytab:
net -P ads keytab create
虽然我select继续使用samba,但我想在使用领域的时候也可以使用这个工作。