Bug 1867912

Summary: realm command to use option like dnshostname=fqdn
Product: Red Hat Enterprise Linux 8 Reporter: Sumit Bose <sbose>
Component: realmdAssignee: Sumit Bose <sbose>
Status: CLOSED ERRATA QA Contact: sssd-qe <sssd-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: sgadekar
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: realmd-0.16.3-19.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 02:17:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 3 shridhar 2020-08-24 11:08:05 UTC
Tested with following details:
~]# rpm -q realmd
realmd-0.16.3-19.el8.x86_64

[root@vm-idm-027 ~]# hostname
vm-idm-027.lab.eng.pnq.redhat.com
[root@vm-idm-027 ~]# 

 ~]# realm join -vvv --membership-software=samba sssd2012r2tree.com
 * Resolving: _ldap._tcp.sssd2012r2tree.com
 * Performing LDAP DSE lookup on: 10.65.207.115
 * Successfully discovered: sssd2012r2tree.com
Password for Administrator: 
 * 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.W931P0 -U Administrator -k ads join sssd2012r2tree.com
Enter Administrator's password:
Using short domain name -- SSSD2012R2TREE
Joined 'VM-IDM-027' to dns domain 'sssd2012r2tree.com'
DNS Update for vm-idm-027.lab.eng.pnq.redhat.com failed: ERROR_DNS_GSS_ERROR
DNS update failed: NT_STATUS_UNSUCCESSFUL
 * LANG=C LOGNAME=root /usr/bin/net -s /var/cache/realmd/realmd-smb-conf.W931P0 -U Administrator ads keytab create
Enter Administrator's password:
 * /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/2020-08-24-10-54-17.IKyrN2
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 and active
  - systemctl enable --now oddjobd.service

 * Successfully enrolled machine in realm
[root@vm-idm-027 ~]# klist -kt
Keytab name: FILE:/etc/krb5.keytab
KVNO Timestamp           Principal
---- ------------------- ------------------------------------------------------
   1 08/24/2020 16:24:09 restrictedkrbhost/vm-idm-027.sssd2012r2tree.com
   1 08/24/2020 16:24:10 restrictedkrbhost/VM-IDM-027
   1 08/24/2020 16:24:09 restrictedkrbhost/vm-idm-027.sssd2012r2tree.com
   1 08/24/2020 16:24:10 restrictedkrbhost/VM-IDM-027
   1 08/24/2020 16:24:09 restrictedkrbhost/vm-idm-027.sssd2012r2tree.com
   1 08/24/2020 16:24:10 restrictedkrbhost/VM-IDM-027
   1 08/24/2020 16:24:10 restrictedkrbhost/vm-idm-027.lab.eng.pnq.redhat.com
   1 08/24/2020 16:24:10 restrictedkrbhost/vm-idm-027.lab.eng.pnq.redhat.com
   1 08/24/2020 16:24:10 restrictedkrbhost/vm-idm-027.lab.eng.pnq.redhat.com
   1 08/24/2020 16:24:10 host/vm-idm-027.sssd2012r2tree.com
   1 08/24/2020 16:24:10 host/VM-IDM-027
   1 08/24/2020 16:24:10 host/vm-idm-027.sssd2012r2tree.com
   1 08/24/2020 16:24:10 host/VM-IDM-027
   1 08/24/2020 16:24:10 host/vm-idm-027.sssd2012r2tree.com
   1 08/24/2020 16:24:10 host/VM-IDM-027
   1 08/24/2020 16:24:10 host/vm-idm-027.lab.eng.pnq.redhat.com
   1 08/24/2020 16:24:10 host/vm-idm-027.lab.eng.pnq.redhat.com
   1 08/24/2020 16:24:10 host/vm-idm-027.lab.eng.pnq.redhat.com                 <<---------<<<<
   1 08/24/2020 16:24:10 VM-IDM-027$@SSSD2012R2TREE.COM
   1 08/24/2020 16:24:11 VM-IDM-027$@SSSD2012R2TREE.COM
   1 08/24/2020 16:24:11 VM-IDM-027$@SSSD2012R2TREE.COM



service principals like host one in this case has been created with it's domainname. 
Marking verified.

Comment 6 errata-xmlrpc 2020-11-04 02:17:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (realmd bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4601