Bug 1746122 - Unable to join active directory with realm using "--computer-ou"
Summary: Unable to join active directory with realm using "--computer-ou"
Keywords:
Status: CLOSED DUPLICATE of bug 1740000
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: samba
Version: 7.6
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: SSSD Maintainers
QA Contact: sssd-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-27 17:45 UTC by René Jr Purcell
Modified: 2019-08-28 12:22 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-27 18:00:15 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1740000 None None None 2019-10-17 07:41:42 UTC

Description René Jr Purcell 2019-08-27 17:45:57 UTC
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):
sssd-1.16.4-21.el7.x86_64
sssd-ad-1.16.4-21.el7.x86_64
sssd-client-1.16.4-21.el7.x86_64
sssd-common-1.16.4-21.el7.x86_64
sssd-common-pac-1.16.4-21.el7.x86_64
sssd-ipa-1.16.4-21.el7.x86_64
sssd-krb5-1.16.4-21.el7.x86_64
sssd-krb5-common-1.16.4-21.el7.x86_64
sssd-ldap-1.16.4-21.el7.x86_64
sssd-proxy-1.16.4-21.el7.x86_64


Working fine on a system with those version:
sssd-1.16.2-13.el7_6.8.x86_64
sssd-ad-1.16.2-13.el7_6.8.x86_64
sssd-client-1.16.2-13.el7_6.8.x86_64
sssd-common-1.16.2-13.el7_6.8.x86_64
sssd-common-pac-1.16.2-13.el7_6.8.x86_64
sssd-ipa-1.16.2-13.el7_6.8.x86_64
sssd-krb5-1.16.2-13.el7_6.8.x86_64
sssd-krb5-common-1.16.2-13.el7_6.8.x86_64
sssd-ldap-1.16.2-13.el7_6.8.x86_64
sssd-proxy-1.16.2-13.el7_6.8.x86_64


How reproducible:

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


Actual results:
# 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

Expected results:
Joined with success.

Additional info:

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)

Comment 2 Sumit Bose 2019-08-27 18:00:15 UTC
Hi,

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.

HTH

bye,
Sumit

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 ***

Comment 3 Sumit Bose 2019-08-27 18:03:59 UTC
Hi,

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.

bye,
Sumit

Comment 4 René Jr Purcell 2019-08-27 18:30:32 UTC
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!

Comment 5 Sumit Bose 2019-08-28 06:22:14 UTC
(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 ?

Hi,

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.

HTH

bye,
Sumit


> 
> 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!

Comment 6 René Jr Purcell 2019-08-28 12:22:32 UTC
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


Note You need to log in before you can comment on or make changes to this bug.