Description of problem:
I'm trying to join a RHEL7 to an AD and register the computer in a specific OU. It doesn't work anymore.
Version-Release number of selected component (if applicable):
Working fine on a system with those version:
Steps to Reproduce:
1. Install fresh rhel7, Update the system and try to join domain as we usually do.
2. # yum update -y
3. # kinit DOMAINJOINADACCOUNT@AD.EXAMPLE.COM
4. # realm join AD.EXAMPLE.COM -U DOMAINJOINADACCOUNT@AD.EXAMPLE.COM --computer-ou='OU=Linux,OU=ADDS,DC=AD,DC=example,DC=com"' -v --verbose
# realm join AD.EXAMPLE.COM -U DOMAINJOINADACCOUNT@AD.EXAMPLE.COM --computer-ou='OU=Linux,OU=ADDS,DC=AD,DC=example,DC=com"' -v --verbose
* Resolving: _ldap._tcp.ad.example.com
* Performing LDAP DSE lookup on: xxx.xxx.xxx.xxx
* Performing LDAP DSE lookup on: xxx.xxx.xxx.xxx
* Successfully discovered: ad.example.com
Password for DOMAINJOINADACCOUNT@AD.EXAMPLE.COM:
* Required files: /usr/sbin/oddjobd, /usr/libexec/oddjob/mkhomedir, /usr/sbin/sssd, /usr/bin/net
* LANG=C LOGNAME=root /usr/bin/net -s /var/cache/realmd/realmd-smb-conf.HVQ66Z -U DOMAINJOINADACCOUNT@AD.EXAMPLE.COM ads join ad.example.com createcomputer=ADDS/Linux
Enter DOMAINJOINADACCOUNT@AD.EXAMPLE.COM's password:
Failed to join domain: failed to precreate account in ou OU=Linux,OU=ADDS,DC=AD,DC=example,DC=com: No such object
! Joining the domain ad.example.com failed
realm: Couldn't join realm: Joining the domain ad.example.com failed
Joined with success.
Here the recap:
- If we join the domain without "--computer-ou" it work and the computer object is created in the default location(Ex. #realm join AD.EXAMPLE.COM -U DOMAINJOINADACCOUNT@AD.EXAMPLE.COM).
- If we specify an OU with "--computer-ou" it fail with the error showned above. No matter which OU we use, including the default one which work without "--computer-ou"..
- Using the same account used to join the vm (In this example DOMAINJOINADACCOUNT) I can create a computer account in a OU without problem. Once the computer object is there, I can join the rhel7 vm and use "--computer-ou" to point in the same OU I created the object and the join work as expected.
- Was working in july, this problem might have been introduced with august update to SSSD (https://www.redhat.com/archives/rhsa-announce/2019-August/msg00052.html)
this is not related to SSSD.
As shown by the verbose output of realmd, realmd call 'net ads join ...' to join the domain which failed. There is a know issue in 'net ads join' with the 'createcomputer' option, see https://bugzilla.redhat.com/show_bug.cgi?id=1740000 for details.
If you are not planning to use the Samba file server on the client you can try
realm join AD.EXAMPLE.COM -U DOMAINJOINADACCOUNT@AD.EXAMPLE.COM --computer-ou='OU=Linux,OU=ADDS,DC=AD,DC=example,DC=com"' --membership-software=adcli
This will created the computer account in the expected OU in AD and create the keytab needed by SSSD as well. It will not created the needed entries in Samba's internal databases like 'net ads join ...' that's why I said a Samba fileserver might not work.
I'll close this ticket as duplicate to the Samba ticket https://bugzilla.redhat.com/show_bug.cgi?id=1740000.
*** This bug has been marked as a duplicate of bug 1740000 ***
I'm sorry, I just realized that https://bugzilla.redhat.com/show_bug.cgi?id=1740000 has access restriction, so you might not be able to see the details.
Hi, thanks for the quick reply, you are right I choosed the wrong component. I tought it was sssd because the packages were updated but as I understand it's coming from samba packages.
As I can't see the BZ#1740000 is there timeline to recieve a fix on RHEL 7 ? Because we do have a workaround, installing realmd from upstream fix the issues but redhat won't support us anymore if we do that so it's only a temporary workaround... Should I simply open a case with the support ?
Samba 4.8.3 seems to work and a rhel7.6 up to date get 4.9.1 which doesn't.
samba-client-libs-4.9.1-6.el7.x86_64 <> samba-client-libs-4.8.3-4.el7.x86_64
samba-common-4.9.1-6.el7.noarch <> samba-common-4.8.3-4.el7.noarch
samba-common-libs-4.9.1-6.el7.x86_64 <> samba-common-libs-4.8.3-4.el7.x86_64
samba-common-tools-4.9.1-6.el7.x86_64 <> samba-common-tools-4.8.3-4.el7.x86_64
samba-libs-4.9.1-6.el7.x86_64 <> samba-libs-4.8.3-4.el7.x86_64
Thanks a lot!
(In reply to René Jr Purcell from comment #4)
> Hi, thanks for the quick reply, you are right I choosed the wrong component.
> I tought it was sssd because the packages were updated but as I understand
> it's coming from samba packages.
> As I can't see the BZ#1740000 is there timeline to recieve a fix on RHEL 7 ?
> Because we do have a workaround, installing realmd from upstream fix the
> issues but redhat won't support us anymore if we do that so it's only a
> temporary workaround... Should I simply open a case with the support ?
if you build realmd from the upstream sources 'adcli' is the default membership-software. If you are using the RHEL version of realmd with the '--membership-software=adcli' option it should work and would be supported as well.
> Samba 4.8.3 seems to work and a rhel7.6 up to date get 4.9.1 which doesn't.
> samba-client-libs-4.9.1-6.el7.x86_64 <> samba-client-libs-4.8.3-4.el7.x86_64
> samba-common-4.9.1-6.el7.noarch <> samba-common-4.8.3-4.el7.noarch
> samba-common-libs-4.9.1-6.el7.x86_64 <> samba-common-libs-4.8.3-4.el7.x86_64
> samba-common-tools-4.9.1-6.el7.x86_64 <>
> samba-libs-4.9.1-6.el7.x86_64 <> samba-libs-4.8.3-4.el7.x86_64
> Thanks a lot!
Thanks this explains why it was working with the latest upstream version. The proposed fix work I'm sharing the info with the team.
Thanks again for your help and quick reply