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 1677832 - Realm join failed Enabling SSSD in nsswitch.conf and PAM failed. realm: Couldn't join realm: Enabling SSSD in nsswitch.conf and PAM failed.
Summary: Realm join failed Enabling SSSD in nsswitch.conf and PAM failed. realm: Could...
Keywords:
Status: CLOSED DUPLICATE of bug 1668025
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: adcli
Version: 8.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Sumit Bose
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-16 07:01 UTC by Abhijit Roy
Modified: 2019-05-22 05:08 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-19 10:19:33 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Abhijit Roy 2019-02-16 07:01:27 UTC
Description of problem:

Realm Join failed
Backup stored at /var/lib/authselect/backups/2019-02-15-10-22-40.kOLlIj
[error] Unable to get current fscreate selinux context!
[error] Unable to create temporary file for [/var/lib/authselect/system-auth] [5]: Input/output error
[error] Unable to write temporary file [/var/lib/authselect/system-auth] [5]: Input/output error
[error] Unable to write generated system files [5]: Input/output error
[error] Unable to activate profile [sssd] [5]: Input/output error
Unable to activate profile [5]: Input/output error
 ! Enabling SSSD in nsswitch.conf and PAM failed.
realm: Couldn't join realm: Enabling SSSD in nsswitch.conf and PAM failed.

Version-Release number of selected component (if applicable):


How reproducible:

 realm join CORP.test.com --one-time-password=`hostname -s` -vvv
 * Resolving: _ldap._tcp.corp.test.com
 * Performing LDAP DSE lookup on: 165.36.208.8
 * Performing LDAP DSE lookup on: 165.36.146.50
 * Performing LDAP DSE lookup on: 165.36.208.4
 * Successfully discovered: corp.test.com
 * Required files: /usr/sbin/oddjobd, /usr/libexec/oddjob/mkhomedir, /usr/sbin/sssd, /usr/sbin/adcli
 * LANG=C /usr/sbin/adcli join --verbose --domain corp.test.com --domain-realm CORP.test.com --domain-controller 165.36.146.50 --login-type computer --stdin-password
 * Using domain name: corp.test.com
 * Calculated computer account name from fqdn: test
 * Using domain realm: corp.test.com
 * Sending netlogon pings to domain controller: cldap://165.36.146.50
 * Received NetLogon info from: watla001px0pr.corp.test.com
 * Wrote out krb5.conf snippet to /var/cache/realmd/adcli-krb5-l1xLnY/krb5.d/adcli-krb5-conf-aUuwDk
 * Authenticated as default/reset computer account: test
 * Looked up short domain name: CORP
 * Looked up domain SID: S-1-5-21-1454471165-2077806209-1801674531
 * Using fully qualified name: test.elab.corp.test.com
 * Using domain name: corp.test.com
 * Using computer account name: test
 * Using domain realm: corp.test.com
 * Calculated computer account name from fqdn: test
 * Generated 120 character computer password
 * Using keytab: FILE:/etc/krb5.keytab
 * Found computer account for test$ at: CN=xxx,OU=Compute Engineering Lab,xx=xxx,OU=xxx,OU=xxx,OU=xxx,DC=xxx,DC=xxx,DC=xxx
 * Sending netlogon pings to domain controller: cldap://165.36.146.50
 * Received NetLogon info from: watla001px0pr.corp.test.com
 * Changed computer password
 * Retrieved kvno '145' for computer account in directory: CN=test,OU=Compute Engineering Lab,OU=Shared Technology,OU=Enterprise Shared Technology,OU=Application,OU=Midrange,DC=corp,DC=bankofamerica,DC=com
 * Discovered which keytab salt to use
 * Added the entries to the keytab: test$@CORP.test.com: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/test.com: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/test.elab.corp.test.com.com: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/test.com: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/test.elab.corp.test.com.com: FILE:/etc/krb5.keytab
 * /usr/bin/systemctl enable sssd.service
 * /usr/bin/systemctl restart sssd.service
 * /usr/bin/sh -c /usr/bin/authselect select sssd with-mkhomedir --force && /usr/bin/systemctl enable oddjobd.service && /usr/bin/systemctl start oddjobd.service
Backup stored at /var/lib/authselect/backups/2019-02-15-10-22-40.kOLlIj
[error] Unable to get current fscreate selinux context!
[error] Unable to create temporary file for [/var/lib/authselect/system-auth] [5]: Input/output error
[error] Unable to write temporary file [/var/lib/authselect/system-auth] [5]: Input/output error
[error] Unable to write generated system files [5]: Input/output error
[error] Unable to activate profile [sssd] [5]: Input/output error
Unable to activate profile [5]: Input/output error
 ! Enabling SSSD in nsswitch.conf and PAM failed.
realm: Couldn't join realm: Enabling SSSD in nsswitch.conf and PAM failed.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Sumit Bose 2019-02-18 08:55:36 UTC
Hi,

I need more details here because I cannot reproduce the issue with current RHEL8:

[root@host-8-242-71 ~]# realm join -v DOM-067.ABC.IDM.LAB.ENG.BRQ.REDHAT.COM
 * Resolving: _ldap._tcp.dom-067.abc.idm.lab.eng.brq.redhat.com
 * Performing LDAP DSE lookup on: 2620:52:0:25aa:84ed:7d2f:1484:60e1
 ! Can't contact LDAP server
 * Performing LDAP DSE lookup on: 10.37.170.126
 * Successfully discovered: dom-067.abc.idm.lab.eng.brq.redhat.com
Password for Administrator:
 * Required files: /usr/sbin/oddjobd, /usr/libexec/oddjob/mkhomedir, /usr/sbin/sssd, /usr/sbin/adcli
 * LANG=C /usr/sbin/adcli join --verbose --domain dom-067.abc.idm.lab.eng.brq.redhat.com --domain-realm DOM-067.ABC.IDM.LAB.ENG.BRQ.REDHAT.COM --domain-controller 10.37.170.126 --login-type user --login-user Administrator --stdin-password
 * Using domain name: dom-067.abc.idm.lab.eng.brq.redhat.com
 * Calculated computer account name from fqdn: HOST-8-242-71
 * Using domain realm: dom-067.abc.idm.lab.eng.brq.redhat.com
 * Sending netlogon pings to domain controller: cldap://10.37.170.126
 * Received NetLogon info from: vm-067.dom-067.abc.idm.lab.eng.brq.redhat.com
 * Wrote out krb5.conf snippet to /var/cache/realmd/adcli-krb5-im889n/krb5.d/adcli-krb5-conf-oG4D1X
 * Authenticated as user: Administrator.IDM.LAB.ENG.BRQ.REDHAT.COM
 * Looked up short domain name: DOM-067
 * Looked up domain SID: S-1-5-21-1622806234-1442095631-4165425077
 * Using fully qualified name: host-8-242-71.host.centralci.eng.rdu2.redhat.com
 * Using domain name: dom-067.abc.idm.lab.eng.brq.redhat.com
 * Using computer account name: HOST-8-242-71
 * Using domain realm: dom-067.abc.idm.lab.eng.brq.redhat.com
 * Calculated computer account name from fqdn: HOST-8-242-71
 * Generated 120 character computer password
 * Using keytab: FILE:/etc/krb5.keytab
 * Found computer account for HOST-8-242-71$ at: CN=HOST-8-242-71,CN=Computers,DC=dom-067,DC=abc,DC=idm,DC=lab,DC=eng,DC=brq,DC=redhat,DC=com
 * Sending netlogon pings to domain controller: cldap://10.37.170.126
 * Received NetLogon info from: vm-067.dom-067.abc.idm.lab.eng.brq.redhat.com
 * Set computer password
 * Retrieved kvno '3' for computer account in directory: CN=HOST-8-242-71,CN=Computers,DC=dom-067,DC=abc,DC=idm,DC=lab,DC=eng,DC=brq,DC=redhat,DC=com
 * Discovered which keytab salt to use
 * Added the entries to the keytab: HOST-8-242-71$@DOM-067.ABC.IDM.LAB.ENG.BRQ.REDHAT.COM: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/HOST-8-242-71.IDM.LAB.ENG.BRQ.REDHAT.COM: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/host-8-242-71.host.centralci.eng.rdu2.redhat.com.IDM.LAB.ENG.BRQ.REDHAT.COM: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/HOST-8-242-71.IDM.LAB.ENG.BRQ.REDHAT.COM: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/host-8-242-71.host.centralci.eng.rdu2.redhat.com.IDM.LAB.ENG.BRQ.REDHAT.COM: FILE:/etc/krb5.keytab
 * /usr/bin/systemctl enable sssd.service
Created symlink /etc/systemd/system/multi-user.target.wants/sssd.service ? /usr/lib/systemd/system/sssd.service.
 * /usr/bin/systemctl restart sssd.service
 * /usr/bin/sh -c /usr/bin/authselect select sssd with-mkhomedir --force && /usr/bin/systemctl enable oddjobd.service && /usr/bin/systemctl start oddjobd.service
Backup stored at /var/lib/authselect/backups/2019-02-18-08-53-57.J944Li
Profile "sssd" was selected.
The following nsswitch maps are overwritten by the profile:
- passwd
- group
- netgroup
- automount
- services

Make sure that SSSD service is configured and enabled. See SSSD documentation for more information.

- with-mkhomedir is selected, make sure pam_oddjob_mkhomedir module
  is present and oddjobd service is enabled
  - systemctl enable oddjobd.service
  - systemctl start oddjobd.service
 * Successfully enrolled machine in realm
[root@host-8-242-71 ~]# rpm -qi realmd
Name        : realmd
Version     : 0.16.3
Release     : 16.el8
Architecture: x86_64
Install Date: Mon Feb 18 03:49:56 2019
Group       : Unspecified
Size        : 827829
License     : LGPLv2+
Signature   : RSA/SHA256, Fri Sep 28 05:40:05 2018, Key ID 199e2f91fd431d51
Source RPM  : realmd-0.16.3-16.el8.src.rpm
Build Date  : Thu Sep 27 11:35:37 2018
Build Host  : x86-vm-01.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://cgit.freedesktop.org/realmd/realmd/
Summary     : Kerberos realm enrollment service
Description :
realmd is a DBus system service which manages discovery and enrollment in realms
and domains like Active Directory or IPA. The control center uses realmd as the
back end to 'join' a domain simply and automatically configure things correctly.

Comment 3 Abhijit Roy 2019-02-19 08:48:13 UTC
Hi Sumit,

With selinux enabled the join & authselect commands run without error

# realm join -v  corp.bankofamerica.com  --one-time-password=`hostname -s`
 * Resolving: _ldap._tcp.corp.bankofamerica.com
 * Performing LDAP DSE lookup on: 165.46.244.30
 * Performing LDAP DSE lookup on: 171.150.151.223
 * Successfully discovered: corp.bankofamerica.com
 * Required files: /usr/sbin/oddjobd, /usr/libexec/oddjob/mkhomedir, /usr/sbin/sssd, /usr/sbin/adcli
 * LANG=C /usr/sbin/adcli join --verbose --domain corp.bankofamerica.com --domain-realm CORP.BANKOFAMERICA.COM --domain-controller 17                                               1.150.151.223 --login-type computer --stdin-password
 * Using domain name: corp.bankofamerica.com
 * Calculated computer account name from fqdn: LNYCE8AEE
 * Using domain realm: corp.bankofamerica.com
 * Sending netlogon pings to domain controller: cldap://171.150.151.223
 * Received NetLogon info from: wltwe0bxpapd1.corp.bankofamerica.com
 * Wrote out krb5.conf snippet to /var/cache/realmd/adcli-krb5-iQi6pd/krb5.d/adcli-krb5-conf-IJbTXg
 * Authenticated as default/reset computer account: LNYCE8AEE
 * Looked up short domain name: CORP
 * Looked up domain SID: S-1-5-21-1454471165-2077806209-1801674531
 * Using fully qualified name: lnyce8aee.elab.corp.bankofamerica.com
 * Using domain name: corp.bankofamerica.com
 * Using computer account name: LNYCE8AEE
 * Using domain realm: corp.bankofamerica.com
 * Calculated computer account name from fqdn: LNYCE8AEE
 * Generated 120 character computer password
 * Using keytab: FILE:/etc/krb5.keytab
 * Found computer account for LNYCE8AEE$ at: CN=lnyce8aee,OU=Compute Engineering Lab,OU=Shared Technology,OU=Enterprise Shared Techno                                               logy,OU=Application,OU=Midrange,DC=corp,DC=bankofamerica,DC=com
 * Sending netlogon pings to domain controller: cldap://171.150.151.223
 * Received NetLogon info from: wltwe0bxpapd1.corp.bankofamerica.com
 * Changed computer password
 * Retrieved kvno '148' for computer account in directory: CN=lnyce8aee,OU=Compute Engineering Lab,OU=Shared Technology,OU=Enterprise                                                Shared Technology,OU=Application,OU=Midrange,DC=corp,DC=bankofamerica,DC=com
 * Discovered which keytab salt to use
 * Added the entries to the keytab: LNYCE8AEE$@CORP.BANKOFAMERICA.COM: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/LNYCE8AEE.COM: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/lnyce8aee.elab.corp.bankofamerica.com.COM: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/LNYCE8AEE.COM: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/lnyce8aee.elab.corp.bankofamerica.com.COM: FILE:/etc/krb5.ke                                               ytab
 * /usr/bin/systemctl enable sssd.service
 * /usr/bin/systemctl restart sssd.service
 * /usr/bin/sh -c /usr/bin/authselect select sssd with-mkhomedir --force && /usr/bin/systemctl enable oddjobd.service && /usr/bin/sys                                               temctl start oddjobd.service
Backup stored at /var/lib/authselect/backups/2019-02-19-08-22-02.H9eQr2
Profile "sssd" was selected.
The following nsswitch maps are overwritten by the profile:
- passwd
- group
- netgroup
- automount
- services

Make sure that SSSD service is configured and enabled. See SSSD documentation for more information.

- with-mkhomedir is selected, make sure pam_oddjob_mkhomedir module
  is present and oddjobd service is enabled
  - systemctl enable oddjobd.service
  - systemctl start oddjobd.service
Created symlink /etc/systemd/system/multi-user.target.wants/oddjobd.service รข /usr/lib/systemd/system/oddjobd.service.
 * Successfully enrolled machine in realm

Comment 4 Abhijit Roy 2019-02-19 08:48:38 UTC
I refer the bug https://bugzilla.redhat.com/show_bug.cgi?id=1668025

Comment 5 Sumit Bose 2019-02-19 09:49:54 UTC
(In reply to Abhijit Roy from comment #4)
> I refer the bug https://bugzilla.redhat.com/show_bug.cgi?id=1668025

Which version of authselect is used when the error occurs? Does it still occur with authselect-1.0-12.el8?

bye,
Sumit

Comment 6 Abhijit Roy 2019-02-19 09:53:23 UTC
Hi Sumit,

Cu is having authselect-1.0-11.el8.x86_64 not authselect-1.0-12.el8.


[supportshell.prod.useraccess-us-west-2.redhat.com] [09:51:42+0000]
[abroy@supportshell lnyce8aee.elab.corp.bankofamerica.com]$ cat installed-rpms |grep auth
authselect-1.0-11.el8.x86_64                                Thu Feb 14 10:31:37 2019
authselect-compat-1.0-11.el8.x86_64                         Thu Feb 14 10:31:42 2019
authselect-libs-1.0-11.el8.x86_64                           Thu Feb 14 10:31:37 2019
[supportshell.prod.useraccess-us-west-2.redhat.com] [09:51:50+0000]
[abroy@supportshell lnyce8aee.elab.corp.bankofamerica.com]$

Comment 7 Sumit Bose 2019-02-19 10:19:33 UTC
Ok, so this a actually a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1668025.

*** This bug has been marked as a duplicate of bug 1668025 ***


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