Bug 1108661
| Summary: | Installers should explicitly specify auth mechanism when calling ldapmodify | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Martin Kosek <mkosek> |
| Component: | ipa | Assignee: | Martin Kosek <mkosek> |
| Status: | CLOSED ERRATA | QA Contact: | Namita Soman <nsoman> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.6 | CC: | abokovoy, jcholast, mkosek, nsoman, rcritten, spoore |
| Target Milestone: | rc | Flags: | nsoman:
needinfo+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | ipa-3.0.0-40.el6 | Doc Type: | Bug Fix |
| Doc Text: |
Cause:
IPA installer may call ldapmodify without explicitly specifying the authentication method, making it overridable by ldapmodify user configuration.
Consequence:
The installer may fail when the authentication method is set in ldapmodify user configuration.
Fix:
Make sure the installer always calls ldapmodify with the authentication method explicitly specified.
Result:
The installer does not fail when authentication method is set in ldapmodify user configuration.
|
Story Points: | --- |
| Clone Of: | 1108213 | Environment: | |
| Last Closed: | 2014-10-14 07:32:53 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1108213 | ||
| Bug Blocks: | |||
|
Description
Martin Kosek
2014-06-12 12:08:34 UTC
Reproducer #1: 1) Create /root/.ldaprc with: SASL_MECH GSSAPI 2) Install IPA server with Trusts: # ipa-server-install # ipa-adtrust-install Reproducer #2: 1) Install IPA server # ipa-server-install 2) Disable anonymous bind 3) Install Trusts: # ipa-adtrust-install Fixed upstream: master: eaaf7ed0f20b81ce10e1e36ce36c673445a83f2b How do I confirm that reproducer #2 in comment #1 has failed? I tried this on both RHEL6.5 and 6.6 and see the same results on both so far. From my 6.5 host: [root@rhel6-5 quickinstall]# ldapmodify -x -D "cn=Directory Manager" -w Secret123 -h $(hostname) -p 389 dn: cn=config changetype: modify replace: nsslapd-allow-anonymous-access nsslapd-allow-anonymous-access: rootdse modifying entry "cn=config" [root@rhel6-5 quickinstall]# service dirsrv restart Shutting down dirsrv: PKI-IPA... [ OK ] TESTRELM-TEST... [ OK ] Starting dirsrv: PKI-IPA... [ OK ] TESTRELM-TEST... [ OK ] [root@rhel6-5 quickinstall]# ipa-adtrust-install The log file for this installation can be found in /var/log/ipaserver-install.log ============================================================================== This program will setup components needed to establish trust to AD domains for the FreeIPA Server. This includes: * Configure Samba * Add trust related objects to FreeIPA LDAP server To accept the default shown in brackets, press the Enter key. The following operations may take some minutes to complete. Please wait until the prompt is returned. Configuring cross-realm trusts for IPA server requires password for user 'admin'. This user is a regular system account used for IPA server administration. admin password: Enter the NetBIOS name for the IPA domain. Only up to 15 uppercase ASCII letters and digits are allowed. Example: EXAMPLE. NetBIOS domain name [TESTRELM]: Configuring CIFS [1/18]: stopping smbd [2/18]: creating samba domain object [3/18]: creating samba config registry [4/18]: writing samba config file [5/18]: adding cifs Kerberos principal [6/18]: adding cifs principal to S4U2Proxy targets [7/18]: adding admin(group) SIDs [8/18]: adding RID bases [9/18]: updating Kerberos config 'dns_lookup_kdc' already set to 'true', nothing to do. [10/18]: activating CLDAP plugin [11/18]: activating sidgen plugin and task [12/18]: activating extdom plugin [13/18]: configuring smbd to start on boot [14/18]: adding special DNS service records [15/18]: restarting Directory Server to take MS PAC and LDAP plugins changes into account [16/18]: adding fallback group [17/18]: setting SELinux booleans [18/18]: starting CIFS services Done configuring CIFS. ============================================================================= Setup complete You must make sure these network ports are open: TCP Ports: * 138: netbios-dgm * 139: netbios-ssn * 445: microsoft-ds UDP Ports: * 138: netbios-dgm * 139: netbios-ssn * 389: (C)LDAP * 445: microsoft-ds Additionally you have to make sure the FreeIPA LDAP server is not reachable by any domain controller in the Active Directory domain by closing down the following ports for these servers: TCP Ports: * 389, 636: LDAP/LDAPS You may want to choose to REJECT the network packets instead of DROPing them to avoid timeouts on the AD domain controllers. ============================================================================= Then in ipaserver-install.log (just one example of ldapmodify): 2014-07-18T15:47:04Z DEBUG [16/18]: adding fallback group 2014-07-18T15:47:04Z DEBUG args=/usr/bin/ldapmodify -v -f /tmp/tmpQibgIP -H ldapi://%2fvar%2frun%2fslapd-TESTRELM-TEST.socket 2014-07-18T15:47:04Z DEBUG stdout=add cn: Default SMB Group add description: Fallback group for primary group RID, do not add users to this group add gidnumber: 999 add objectclass: top ipaobject posixgroup adding new entry "cn=Default SMB Group,cn=groups,cn=accounts,dc=testrelm,dc=test" modify complete 2014-07-18T15:47:04Z DEBUG stderr=ldap_initialize( ldapi://%2Fvar%2Frun%2Fslapd-TESTRELM-TEST.socket/??base ) SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 2014-07-18T15:47:04Z DEBUG duration: 0 seconds Then in /var/log/messages, I see a lot of errors I think related to anonymous bind being disabled: Jul 18 10:47:43 rhel6-5 smbd[4619]: [2014/07/18 10:47:43.222067, 0] ../source3/smbd/server.c:1280(main) Jul 18 10:47:43 rhel6-5 smbd[4619]: standard input is not a socket, assuming -D option Jul 18 10:47:43 rhel6-5 winbindd[4640]: [2014/07/18 10:47:43.753784, 0] ../source3/winbindd/winbindd_cache.c:3161(initialize_winbindd_cache) Jul 18 10:47:43 rhel6-5 winbindd[4640]: initialize_winbindd_cache: clearing cache and re-creating with version number 2 Jul 18 10:47:44 rhel6-5 smbd[4620]: [2014/07/18 10:47:44.385235, 0] ipa_sam.c:3845(bind_callback) Jul 18 10:47:44 rhel6-5 smbd[4620]: bind_callback: cannot perform interactive SASL bind with GSSAPI. LDAP security error is 49 Jul 18 10:47:44 rhel6-5 smbd[4620]: [2014/07/18 10:47:44.385389, 0] ../source3/lib/smbldap.c:998(smbldap_connect_system) Jul 18 10:47:44 rhel6-5 smbd[4620]: failed to bind to server ldapi://%2fvar%2frun%2fslapd-TESTRELM-TEST.socket with dn="[Anonymous bind]" Error: Invalid credentials Jul 18 10:47:44 rhel6-5 smbd[4620]: #011SASL(-13): authentication failure: GSSAPI Failure: gss_accept_sec_context Jul 18 10:47:44 rhel6-5 winbindd[4651]: [2014/07/18 10:47:44.386011, 0] ipa_sam.c:3845(bind_callback) Jul 18 10:47:44 rhel6-5 winbindd[4651]: bind_callback: cannot perform interactive SASL bind with GSSAPI. LDAP security error is 49 Jul 18 10:47:44 rhel6-5 winbindd[4651]: [2014/07/18 10:47:44.413272, 0] ../source3/lib/smbldap.c:998(smbldap_connect_system) Jul 18 10:47:44 rhel6-5 winbindd[4651]: failed to bind to server ldapi://%2fvar%2frun%2fslapd-TESTRELM-TEST.socket with dn="[Anonymous bind]" Error: Invalid credentials Jul 18 10:47:44 rhel6-5 winbindd[4651]: #011SASL(-13): authentication failure: GSSAPI Failure: gss_accept_sec_context And winbind crashes. I see that on both 6.5 and 6.6 though. So, how do I confirm the bug using the second reproducer? Also, is this the expected failure we'll see for reproducer #1? ... Configuring CIFS [1/18]: stopping smbd [2/18]: creating samba domain object [3/18]: creating samba config registry [4/18]: writing samba config file [5/18]: adding cifs Kerberos principal [6/18]: adding cifs principal to S4U2Proxy targets [7/18]: adding admin(group) SIDs [8/18]: adding RID bases [9/18]: updating Kerberos config 'dns_lookup_kdc' already set to 'true', nothing to do. [10/18]: activating CLDAP plugin ipa : CRITICAL Failed to load ipa-cldap-conf.ldif: Command '/usr/bin/ldapmodify -v -f /tmp/tmp_gqUji -H ldapi://%2fvar%2frun%2fslapd-IPA1-EXAMPLE-TEST.socket' returned non-zero exit status 50 [11/18]: activating sidgen plugin and task ipa : CRITICAL Failed to load ipa-sidgen-conf.ldif: Command '/usr/bin/ldapmodify -v -f /tmp/tmp_qU4EM -H ldapi://%2fvar%2frun%2fslapd-IPA1-EXAMPLE-TEST.socket' returned non-zero exit status 50 ipa : CRITICAL Failed to load ipa-sidgen-task-conf.ldif: Command '/usr/bin/ldapmodify -v -f /tmp/tmp3mAhm8 -H ldapi://%2fvar%2frun%2fslapd-IPA1-EXAMPLE-TEST.socket' returned non-zero exit status 50 [12/18]: activating extdom plugin ipa : CRITICAL Failed to load ipa-extdom-extop-conf.ldif: Command '/usr/bin/ldapmodify -v -f /tmp/tmpjovL9f -H ldapi://%2fvar%2frun%2fslapd-IPA1-EXAMPLE-TEST.socket' returned non-zero exit status 50 [13/18]: configuring smbd to start on boot [14/18]: adding special DNS service records [15/18]: restarting Directory Server to take MS PAC and LDAP plugins changes into account [16/18]: adding fallback group [17/18]: setting SELinux booleans [18/18]: starting CIFS services Done configuring CIFS. (In reply to Scott Poore from comment #6) > Also, is this the expected failure we'll see for reproducer #1? I think so, you could check the logs to be absolutely sure. (In reply to Scott Poore from comment #5) > How do I confirm that reproducer #2 in comment #1 has failed? > > I tried this on both RHEL6.5 and 6.6 and see the same results on both so > far. Could this be related to Bug 1104901? CCing Alexander. In my test with ipa-server-3.0.0-42.el6.x86_64, this scenario worked: # ipa-server-install # ldapmodify -x -D "cn=directory manager" -w Secret123 -h `hostname` dn: cn=config changetype: modify replace: nsslapd-allow-anonymous-access nsslapd-allow-anonymous-access: rootdse modifying entry "cn=config" # service dirsrv restart Shutting down dirsrv: IDM-LAB-BOS-REDHAT-COM... [ OK ] PKI-IPA... [ OK ] Starting dirsrv: IDM-LAB-BOS-REDHAT-COM... [ OK ] PKI-IPA... [ OK ] # ipa-adtrust-install ... Configuring CIFS [1/18]: stopping smbd [2/18]: creating samba domain object [3/18]: creating samba config registry [4/18]: writing samba config file [5/18]: adding cifs Kerberos principal [6/18]: adding cifs principal to S4U2Proxy targets [7/18]: adding admin(group) SIDs [8/18]: adding RID bases [9/18]: updating Kerberos config 'dns_lookup_kdc' already set to 'true', nothing to do. [10/18]: activating CLDAP plugin [11/18]: activating sidgen plugin and task [12/18]: activating extdom plugin [13/18]: configuring smbd to start on boot [14/18]: adding special DNS service records [15/18]: restarting Directory Server to take MS PAC and LDAP plugins changes into account [16/18]: adding fallback group [17/18]: setting SELinux booleans [18/18]: starting CIFS services Done configuring CIFS. ... # tail /var/log/samba/log.smbd [2014/07/21 16:43:16.238069, 1] ../source3/passdb/account_pol.c:346(account_policy_get) account_policy_get: tdb_fetch_uint32 failed for type 8 (bad lockout attempt), returning 0 [2014/07/21 16:43:16.238151, 1] ../source3/passdb/account_pol.c:346(account_policy_get) account_policy_get: tdb_fetch_uint32 failed for type 9 (disconnect time), returning 0 [2014/07/21 16:43:16.241315, 1] ../source3/passdb/account_pol.c:346(account_policy_get) account_policy_get: tdb_fetch_uint32 failed for type 10 (refuse machine password change), returning 0 [2014/07/21 16:43:16.291057, 1] ../source3/rpc_server/epmd.c:148(start_epmd) Forking Endpoint Mapper Daemon [2014/07/21 16:43:16.361693, 1] ../source3/rpc_server/lsasd.c:854(start_lsasd) Forking LSA Service Daemon I am now actually thinking where did the reproducer #2 come from. Reproducer #1 is solid, #2 may not be so relevant. I have got reproducer #2 working, prior to the patch it was failing and the failure is visible in /var/log/ipaserver-install.log. Note that you should look there instead of attempting to use smbd because if entries were not created properly, you'll never get smbd working properly either but the root problem should be seen at ipa-adtrust-install time (i.e. in ipaserver-install.log). Martin,
In logs I do see success for reproducer #1 where it fails on older:
On older server where it failed:
2014-07-18T17:55:33Z DEBUG [12/18]: activating extdom plugin
2014-07-18T17:55:33Z DEBUG args=/usr/bin/ldapmodify -v -f /tmp/tmpjovL9f -H ldapi://%2fvar%2frun%2fslapd-IPA1-EXAMPLE-TEST.socket
2014-07-18T17:55:33Z DEBUG stdout=add objectclass:
top
nsSlapdPlugin
extensibleObject
add cn:
ipa_extdom_extop
add nsslapd-pluginpath:
libipa_extdom_extop
add nsslapd-plugininitfunc:
ipa_extdom_init
add nsslapd-plugintype:
extendedop
add nsslapd-pluginenabled:
on
add nsslapd-pluginid:
ipa_extdom_extop
add nsslapd-pluginversion:
1.0
add nsslapd-pluginvendor:
RedHat
add nsslapd-plugindescription:
Support resolving IDs in trusted domains to names and back
add nsslapd-plugin-depends-on-type:
database
add nsslapd-basedn:
dc=ipa1,dc=example,dc=test
adding new entry "cn=ipa_extdom_extop,cn=plugins,cn=config"
2014-07-18T17:55:33Z DEBUG stderr=ldap_initialize( ldapi://%2Fvar%2Frun%2Fslapd-IPA1-EXAMPLE-TEST.socket/??base )
SASL/GSSAPI authentication started
SASL username: admin.TEST
SASL SSF: 56
SASL data security layer installed.
ldap_add: Insufficient access (50)
additional info: Insufficient 'add' privilege to add the entry 'cn=plugins,cn=config'.
2014-07-18T17:55:33Z CRITICAL Failed to load ipa-extdom-extop-conf.ldif: Command '/usr/bin/ldapmodify -v -f /tmp/tmpjovL9f -H ldapi://%2fvar%2frun%2fslapd-IPA1-EXAMPLE-TEST.socket' returned non-zero exit status 50
2014-07-18T17:55:33Z DEBUG duration: 0 seconds
On RHEL6.6 server where it did not fail:
2014-07-18T17:55:34Z DEBUG [12/18]: activating extdom plugin
2014-07-18T17:55:34Z DEBUG args=/usr/bin/ldapmodify -v -f /tmp/tmp7DRmGd -H ldapi://%2fvar%2frun%2fslapd-IPA1-EXAMPLE-TEST.socket -Y EXTERNAL
2014-07-18T17:55:34Z DEBUG stdout=add objectclass:
top
nsSlapdPlugin
extensibleObject
add cn:
ipa_extdom_extop
add nsslapd-pluginpath:
libipa_extdom_extop
add nsslapd-plugininitfunc:
ipa_extdom_init
add nsslapd-plugintype:
extendedop
add nsslapd-pluginenabled:
on
add nsslapd-pluginid:
ipa_extdom_extop
add nsslapd-pluginversion:
1.0
add nsslapd-pluginvendor:
RedHat
add nsslapd-plugindescription:
Support resolving IDs in trusted domains to names and back
add nsslapd-plugin-depends-on-type:
database
add nsslapd-basedn:
dc=ipa1,dc=example,dc=test
adding new entry "cn=ipa_extdom_extop,cn=plugins,cn=config"
modify complete
2014-07-18T17:55:34Z DEBUG stderr=ldap_initialize( ldapi://%2Fvar%2Frun%2Fslapd-IPA1-EXAMPLE-TEST.socket/??base )
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
2014-07-18T17:55:34Z DEBUG duration: 0 seconds
Thanks
Alexander, Do you have an example of what I should see in ipaserver-install.log when this fails for reproducer #2? I tried again and saw the same thing: Looking at the same failure I saw in comment #9 from reproducer #1, I checked again for reproducer #2 to fail. However, I don't see a failure. 2014-07-21T14:18:23Z DEBUG [12/18]: activating extdom plugin 2014-07-21T14:18:23Z DEBUG args=/usr/bin/ldapmodify -v -f /tmp/tmpmZj03R -H ldapi://%2fvar%2frun%2fslapd-IPA1-EXAMPLE-TEST.socket 2014-07-21T14:18:23Z DEBUG stdout=add objectclass: top nsSlapdPlugin extensibleObject add cn: ipa_extdom_extop add nsslapd-pluginpath: libipa_extdom_extop add nsslapd-plugininitfunc: ipa_extdom_init add nsslapd-plugintype: extendedop add nsslapd-pluginenabled: on add nsslapd-pluginid: ipa_extdom_extop add nsslapd-pluginversion: 1.0 add nsslapd-pluginvendor: RedHat add nsslapd-plugindescription: Support resolving IDs in trusted domains to names and back add nsslapd-plugin-depends-on-type: database add nsslapd-basedn: dc=ipa1,dc=example,dc=test adding new entry "cn=ipa_extdom_extop,cn=plugins,cn=config" modify complete 2014-07-21T14:18:23Z DEBUG stderr=ldap_initialize( ldapi://%2Fvar%2Frun%2Fslapd-IPA1-EXAMPLE-TEST.socket/??base ) SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 2014-07-21T14:18:23Z DEBUG duration: 0 seconds Thanks, Scott Also, is there a way to verify this one that does not require ipa-adtrust-install? Or is that the primary culprit here? What about ipa-dns-install? Could I test with that instead? I tried ipa-dns-install with reproducer #1 and it worked fine. So the only known reproducer for this bug is still reproducer #1 and ipa-adtrust-install. I talked to Alexander and unfortunately we don't have example ipaserver-install.log failures to compare. Since I was unable to reproduce with #2, I'll mark this verified sanityonly with reproducer #1. Verified. Version :: ipa-server-3.0.0-42.el6.x86_64 Results :: See comment #9 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, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1383.html |