RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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-12-04 06:21 UTC (History)
11 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
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1740000 1 None None None 2023-09-07 20:23:18 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.COM
4. # realm join AD.EXAMPLE.COM -U DOMAINJOINADACCOUNT.COM --computer-ou='OU=Linux,OU=ADDS,DC=AD,DC=example,DC=com"' -v --verbose


Actual results:
# realm join AD.EXAMPLE.COM -U DOMAINJOINADACCOUNT.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.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.COM ads join ad.example.com createcomputer=ADDS/Linux
Enter DOMAINJOINADACCOUNT.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.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.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

Comment 7 NQB 2019-10-24 12:44:17 UTC
Hello,

Is it possible to have some details about BZ#1740000 or a reference to an upstream Samba bug ?

Thanks.

Comment 8 Guenther Deschner 2019-10-24 12:51:07 UTC
Sure, https://bugzilla.redhat.com/show_bug.cgi?id=1740000 just deals with providing the fix from https://bugzilla.samba.org/show_bug.cgi?id=14007

Comment 9 NQB 2019-10-24 13:09:07 UTC
Thanks Guenther.

Any ideas when upstream patch will be included in RedHat ?

Comment 10 NQB 2019-12-04 06:21:47 UTC
Patch included in RedHat: https://access.redhat.com/errata/RHBA-2019:3969


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