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 1826964 - [RFE] Enable LDAPS functionality in realmd join
Summary: [RFE] Enable LDAPS functionality in realmd join
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: realmd
Version: 8.0
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: 8.0
Assignee: Sumit Bose
QA Contact: shridhar
URL:
Whiteboard: sync-to-jira
Depends On:
Blocks: 1894575
TreeView+ depends on / blocked
 
Reported: 2020-04-22 21:07 UTC by Abhijit Roy
Modified: 2023-10-06 19:48 UTC (History)
6 users (show)

Fixed In Version: realmd-0.16.3-22.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 14:56:57 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SSSD-2834 0 None None None 2023-10-06 19:48:38 UTC

Description Abhijit Roy 2020-04-22 21:07:46 UTC
Description of problem:

[RFE] Enable LDAPS functionality in realmd join

like we have with adcli

 # LDAPTLS_CACERT=<cert path> adcli join --use-ldaps <domain_name> -U <username> --verbose

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 6 shridhar 2020-11-18 19:08:45 UTC
Please provide verification steps.

Comment 7 Sumit Bose 2020-11-20 09:17:26 UTC
(In reply to shridhar from comment #6)
> Please provide verification steps.

Hi,

this is similar to the test of '--use-ldaps' for adcli.

- make sure AD DC has ldaps port 636 configured and working and block default LDAP 389 port
- check if 'realm discover --user-ldaps ...' works as expected
- check if 'realm join --use-ldaps --membership-software=adcli ....' works as expected
- check if 'realm leave --use-ldaps --membership-software=adcli ...' works as expected

As mentioned in the man page with '--membership-software=samba' the '--use-ldaps' option currently has no effect.

HTH

bye,
Sumit

Comment 8 shridhar 2020-12-09 18:13:27 UTC
Tested with following data:
:: [ 08:19:36 ] :: [   LOG    ] :: Add rule for dropping port TCP 389
:: [ 08:19:36 ] :: [  BEGIN   ] :: Running 'iptables -A OUTPUT -p tcp --destination-port 389 -j DROP'
:: [ 08:19:36 ] :: [   PASS   ] :: Command 'iptables -A OUTPUT -p tcp --destination-port 389 -j DROP' (Expected 0, got 0)
:: [ 08:19:36 ] :: [  BEGIN   ] :: Running 'iptables-save'
# Generated by iptables-save v1.8.4 on Wed Dec  9 08:19:36 2020
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A OUTPUT -p tcp -m tcp --dport 389 -j DROP
COMMIT
# Completed on Wed Dec  9 08:19:36 2020
:: [ 08:19:36 ] :: [   PASS   ] :: Command 'iptables-save' (Expected 0, got 0)


t]# rpm -Uvh realmd-0.16.3-22.el8.x86_64.rpm 
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:realmd-0.16.3-22.el8             ################################# [ 50%]
Cleaning up / removing...
   2:realmd-0.16.3-20.el8             ################################# [100%]
[root@ci-vm-10-0-139-246 tmp.gOJjfyQO3t]# exit
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 17471s
::   Assertions: 17 good, 0 bad
::   RESULT: PASS (Setup)


::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 13:10:23 ] :: [  BEGIN   ] :: Join computer to AD :: actually running 'realm join --use-ldaps --membership-software=adcli --verbose ad.baseos.qe'
 * Resolving: _ldap._tcp.ad.baseos.qe
 * Performing LDAP DSE lookup on: 10.37.152.14
 * Successfully discovered: ad.baseos.qe
 * Required files: /usr/sbin/oddjobd, /usr/libexec/oddjob/mkhomedir, /usr/sbin/sssd, /usr/sbin/adcli
 * Joining using a truncated netbios name: CI-VM-10-0-139-
 * LANG=C /usr/sbin/adcli join --verbose --domain ad.baseos.qe --domain-realm AD.BASEOS.QE --use-ldaps --domain-controller xxxx --computer-name CI-VM-10-0-139- --login-type user --login-ccache=/var/cache/realmd/realm-ad-kerberos-QTCSV0
 * Using domain name: ad.baseos.qe
 * Using computer account name: CI-VM-10-0-139-
 * Using domain realm: ad.baseos.qe
 * Sending NetLogon ping to domain controller: 10.37.152.14
 * Received NetLogon info from: sec-ad1.ad.baseos.qe
 * Using LDAPS to connect to 10.37.152.14
 * Wrote out krb5.conf snippet to /var/cache/realmd/adcli-krb5-9kJA8B/krb5.d/adcli-krb5-conf-W9rhYi
 * Using GSSAPI for SASL bind
 * Looked up short domain name: AD
 * Looked up domain SID: S-1-5-21-3917357665-4280980005-1639201238
 * Using fully qualified name: ci-vm-10-0-139-246.hosted.upshift.rdu2.redhat.com
 * Using domain name: ad.baseos.qe
 * Using computer account name: CI-VM-10-0-139-
 * Using domain realm: ad.baseos.qe
 * Enrolling computer name: CI-VM-10-0-139-
 * Generated 120 character computer password
 * Using keytab: FILE:/etc/krb5.keytab
 * A computer account for CI-VM-10-0-139-$ does not exist
 * Found well known computer container at: CN=Computers,DC=ad,DC=baseos,DC=qe
 * Calculated computer account: CN=CI-VM-10-0-139-,CN=Computers,DC=ad,DC=baseos,DC=qe
 * Encryption type [16] not permitted.
 * Encryption type [23] not permitted.
 * Encryption type [3] not permitted.
 * Encryption type [1] not permitted.
 * Created computer account: CN=CI-VM-10-0-139-,CN=Computers,DC=ad,DC=baseos,DC=qe
 * Sending NetLogon ping to domain controller: 10.37.152.14
 * Received NetLogon info from: sec-ad1.ad.baseos.qe
 * Set computer password
 * Retrieved kvno '2' for computer account in directory: CN=CI-VM-10-0-139-,CN=Computers,DC=ad,DC=baseos,DC=qe
 * Checking RestrictedKrbHost/ci-vm-10-0-139-246.hosted.upshift.rdu2.redhat.com
 *    Added RestrictedKrbHost/ci-vm-10-0-139-246.hosted.upshift.rdu2.redhat.com
 * Checking RestrictedKrbHost/CI-VM-10-0-139-
 *    Added RestrictedKrbHost/CI-VM-10-0-139-
 * Checking host/ci-vm-10-0-139-246.hosted.upshift.rdu2.redhat.com
 *    Added host/ci-vm-10-0-139-246.hosted.upshift.rdu2.redhat.com
 * Checking host/CI-VM-10-0-139-
 *    Added host/CI-VM-10-0-139-
 * Discovered which keytab salt to use
 * Added the entries to the keytab: CI-VM-10-0-139-$@AD.BASEOS.QE: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/CI-VM-10-0-139-.QE: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: host/ci-vm-10-0-139-246.hosted.upshift.rdu2.redhat.com.QE: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/CI-VM-10-0-139-.QE: FILE:/etc/krb5.keytab
 * Added the entries to the keytab: RestrictedKrbHost/ci-vm-10-0-139-246.hosted.upshift.rdu2.redhat.com.QE: FILE:/etc/krb5.keytab
 ! Failed to update Kerberos configuration, not fatal, please check manually: Setting attribute standard::type not supported
 * /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/2020-12-09-18-10-36.VFyFas
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

Created symlink /etc/systemd/system/multi-user.target.wants/oddjobd.service → /usr/lib/systemd/system/oddjobd.service.
 * Successfully enrolled machine in realm
:: [ 13:10:36 ] :: [   PASS   ] :: Join computer to AD (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 13s
::   Assertions: 1 good, 0 bad
::   RESULT: PASS (Test)



Marking verified.

Comment 11 errata-xmlrpc 2021-05-18 14:56:57 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-2021:1635


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