Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1849696

Summary: realm command to use option like dnshostname=fqdn [rhel-7.9.z]
Product: Red Hat Enterprise Linux 7 Reporter: mpanaous
Component: realmdAssignee: Sumit Bose <sbose>
Status: CLOSED ERRATA QA Contact: shridhar <sgadekar>
Severity: high Docs Contact:
Priority: medium    
Version: 7.8CC: jreznik, sbose, sgadekar, sgoveas, tscherf
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: realmd-0.16.1-12.el7_9.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-15 11:21:48 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 12 shridhar 2020-12-02 08:43:22 UTC
Tested with following data:

rhel                                                                                                                                                                                        | 2.8 kB  00:00:00     
rhel-opt                                                                                                                                                                                    | 2.3 kB  00:00:00     
rhel1                                                                                                                                                                                       | 2.8 kB  00:00:00     
Resolving Dependencies
--> Running transaction check
---> Package realmd.x86_64 0:0.16.1-12.el7 will be updated
---> Package realmd.x86_64 0:0.16.1-12.el7_9.1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                         Arch                                            Version                                                      Repository                                      Size
===================================================================================================================================================================================================================
Updating:
 realmd                                          x86_64                                          0.16.1-12.el7_9.1                                            rhel1                                          210 k

Transaction Summary
===================================================================================================================================================================================================================
Upgrade  1 Package

Total download size: 210 k
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
realmd-0.16.1-12.el7_9.1.x86_64.rpm                                                                                                                                                         | 210 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : realmd-0.16.1-12.el7_9.1.x86_64                                                                                                                                                                 1/2 
  Cleanup    : realmd-0.16.1-12.el7.x86_64                                                                                                                                                                     2/2 
  Verifying  : realmd-0.16.1-12.el7_9.1.x86_64                                                                                                                                                                 1/2 
  Verifying  : realmd-0.16.1-12.el7.x86_64                                                                                                                                                                     2/2 
rhel1/productid                                                                                                                                                                             | 1.6 kB  00:00:00     

Updated:
  realmd.x86_64 0:0.16.1-12.el7_9.1                                                                                                                                                                                

Complete!
[root@ci-vm-10-0-137-246 tmp.fzXzcklod1]# ls
new
[root@ci-vm-10-0-137-246 tmp.fzXzcklod1]# exit
:: [ 03:40:40 ] :: [  BEGIN   ] :: Running 'realmd_command --passwd=Pass2012! realm -v join --membership-software=samba --user=Amy-admin ad.baseos.qe'
ARGS=--passwd=Pass2012! realm -v join --membership-software=samba --user=Amy-admin ad.baseos.qe
EXP_SCRIPT=/tmp/tmp.VhN5BxkJpG
argnum=1
exp: PASSWORD = Pass2012!
exp: COMMAND  = realm -v join --membership-software=samba --user=Amy-admin ad.baseos.qe
spawn realm -v join --membership-software=samba --user=Amy-admin ad.baseos.qe
 * Resolving: _ldap._tcp.ad.baseos.qe
 * Performing LDAP DSE lookup on: 10.37.152.14
 * Successfully discovered: ad.baseos.qe
Password for Amy-admin: 
 * Required files: /usr/sbin/oddjobd, /usr/libexec/oddjob/mkhomedir, /usr/sbin/sssd, /usr/bin/net
 * Joining using a truncated netbios name: CI-VM-10-0-137-
 * LANG=C LOGNAME=root /usr/bin/net -s /var/cache/realmd/realmd-smb-conf.BLMSU0 -U Amy-admin ads join ad.baseos.qe
Enter Amy-admin's password:
Using short domain name -- AD
Joined 'CI-VM-10-0-137-' to dns domain 'ad.baseos.qe'
No DNS domain configured for ci-vm-10-0-137-. Unable to perform DNS Update.
DNS update failed: NT_STATUS_INVALID_PARAMETER
 * LANG=C LOGNAME=root /usr/bin/net -s /var/cache/realmd/realmd-smb-conf.BLMSU0 -U Amy-admin ads keytab create
Enter Amy-admin's password:
 * /usr/bin/systemctl enable sssd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/sssd.service to /usr/lib/systemd/system/sssd.service.
 * /usr/bin/systemctl restart sssd.service
 * /usr/bin/sh -c /usr/sbin/authconfig --update --enablesssd --enablesssdauth --enablemkhomedir --nostart && /usr/bin/systemctl enable oddjobd.service && /usr/bin/systemctl start oddjobd.service
 * Successfully enrolled machine in realm
exp: RESULT=11311 exp6 0 0
RET=0
:: [ 03:41:21 ] :: [   PASS   ] :: Command 'realmd_command --passwd=Pass2012! realm -v join --membership-software=samba --user=Amy-admin ad.baseos.qe' (Expected 0, got 0)
.hosted.upshift.rdu2.redhat.com
.hosted.upshift.rdu2.redhat.com
:: [ 03:41:21 ] :: [  BEGIN   ] :: Running 'klist -kt'
Keytab name: FILE:/etc/krb5.keytab
KVNO Timestamp           Principal
---- ------------------- ------------------------------------------------------
   1 12/02/2020 03:41:17 restrictedkrbhost/ci-vm-10-0-137-.ad.baseos.qe.QE
   1 12/02/2020 03:41:18 restrictedkrbhost/CI-VM-10-0-137-.QE
   1 12/02/2020 03:41:17 restrictedkrbhost/ci-vm-10-0-137-.ad.baseos.qe.QE
   1 12/02/2020 03:41:18 restrictedkrbhost/CI-VM-10-0-137-.QE
   1 12/02/2020 03:41:17 restrictedkrbhost/ci-vm-10-0-137-.ad.baseos.qe.QE
   1 12/02/2020 03:41:18 restrictedkrbhost/CI-VM-10-0-137-.QE
   1 12/02/2020 03:41:17 restrictedkrbhost/ci-vm-10-0-137-.ad.baseos.qe.QE
   1 12/02/2020 03:41:18 restrictedkrbhost/CI-VM-10-0-137-.QE
   1 12/02/2020 03:41:17 restrictedkrbhost/ci-vm-10-0-137-.ad.baseos.qe.QE
   1 12/02/2020 03:41:18 restrictedkrbhost/CI-VM-10-0-137-.QE
   1 12/02/2020 03:41:18 restrictedkrbhost/ci-vm-10-0-137-246.hosted.upshift.rdu2.redhat.com.QE
   1 12/02/2020 03:41:18 restrictedkrbhost/ci-vm-10-0-137-246.hosted.upshift.rdu2.redhat.com.QE
   1 12/02/2020 03:41:18 restrictedkrbhost/ci-vm-10-0-137-246.hosted.upshift.rdu2.redhat.com.QE
   1 12/02/2020 03:41:18 restrictedkrbhost/ci-vm-10-0-137-246.hosted.upshift.rdu2.redhat.com.QE
   1 12/02/2020 03:41:18 restrictedkrbhost/ci-vm-10-0-137-246.hosted.upshift.rdu2.redhat.com.QE
   1 12/02/2020 03:41:18 host/ci-vm-10-0-137-.ad.baseos.qe.QE
   1 12/02/2020 03:41:19 host/CI-VM-10-0-137-.QE
   1 12/02/2020 03:41:18 host/ci-vm-10-0-137-.ad.baseos.qe.QE
   1 12/02/2020 03:41:19 host/CI-VM-10-0-137-.QE
   1 12/02/2020 03:41:18 host/ci-vm-10-0-137-.ad.baseos.qe.QE
   1 12/02/2020 03:41:19 host/CI-VM-10-0-137-.QE
   1 12/02/2020 03:41:18 host/ci-vm-10-0-137-.ad.baseos.qe.QE
   1 12/02/2020 03:41:19 host/CI-VM-10-0-137-.QE
   1 12/02/2020 03:41:18 host/ci-vm-10-0-137-.ad.baseos.qe.QE
   1 12/02/2020 03:41:19 host/CI-VM-10-0-137-.QE
   1 12/02/2020 03:41:19 host/ci-vm-10-0-137-246.hosted.upshift.rdu2.redhat.com.QE
   1 12/02/2020 03:41:19 host/ci-vm-10-0-137-246.hosted.upshift.rdu2.redhat.com.QE
   1 12/02/2020 03:41:19 host/ci-vm-10-0-137-246.hosted.upshift.rdu2.redhat.com.QE
   1 12/02/2020 03:41:19 host/ci-vm-10-0-137-246.hosted.upshift.rdu2.redhat.com.QE
   1 12/02/2020 03:41:19 host/ci-vm-10-0-137-246.hosted.upshift.rdu2.redhat.com.QE
   1 12/02/2020 03:41:20 CI-VM-10-0-137-$@AD.BASEOS.QE
   1 12/02/2020 03:41:20 CI-VM-10-0-137-$@AD.BASEOS.QE
   1 12/02/2020 03:41:20 CI-VM-10-0-137-$@AD.BASEOS.QE
   1 12/02/2020 03:41:20 CI-VM-10-0-137-$@AD.BASEOS.QE
   1 12/02/2020 03:41:20 CI-VM-10-0-137-$@AD.BASEOS.QE
:: [ 03:41:21 ] :: [   PASS   ] :: Command 'klist -kt' (Expected 0, got 0)
:: [ 03:41:21 ] :: [   PASS   ] :: Service principals (HOST) is created with it's domainname which is different than AD-domainname 
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 1399s
::   Assertions: 3 good, 0 bad
::   RESULT: PASS (Bug 1867912 - realm command to use option like dnshostname=fqdn)



Marking verified.

Comment 16 errata-xmlrpc 2020-12-15 11:21:48 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:5458