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 922843

Summary: unattended ipa-client installation fails when anonymous access to LDAP is disabled on IPA servers
Product: Red Hat Enterprise Linux 6 Reporter: pgustafs
Component: ipaAssignee: Martin Kosek <mkosek>
Status: CLOSED ERRATA QA Contact: Namita Soman <nsoman>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: dpal, mkosek, pasteur, sigbjorn
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: ipa-3.0.0-29.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-21 20:51:51 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:
Bug Depends On:    
Bug Blocks: 924100, 952741, 952745    

Description pgustafs 2013-03-18 16:28:06 UTC
Description of problem:
unattended ipa-client-install fails when anonymous access to LDAP is disabled on IPA servers:

/usr/sbin/ipa-client-install -p admin -w somepass --mkhomedir -dd -U
/usr/sbin/ipa-client-install was invoked with options: {'domain': None, 'force': False, 'krb5_offline_passwords': True, 'primary': False, 'mkhomedir': True, 'create_sshfp': True, 'conf_sshd': True, 'on_master': False, 'conf_ntp': True, 'ca_cert_file': None, 'ntp_server': None, 'principal': 'admin', 'hostname': None, 'no_ac': False, 'unattended': True, 'sssd': True, 'trust_sshfp': False, 'dns_updates': False, 'realm_name': None, 'conf_ssh': True, 'server': None, 'prompt_password': False, 'permit': False, 'debug': True, 'preserve_sssd': False, 'uninstall': False}
missing options might be asked for interactively later
Loading Index file from '/var/lib/ipa-client/sysrestore/sysrestore.index'
Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
[IPA Discovery]
Starting IPA discovery with domain=None, servers=None, hostname=31075-01.example.com
Start searching for LDAP SRV record in "example.com" (domain of the hostname) and its sub-domains
Search DNS for SRV record of _ldap._tcp.example.com.
DNS record found: DNSResult::name:_ldap._tcp.example.com.,type:33,class:1,rdata={priority:0,port:389,weight:100,server:ipa2.example.com.}
DNS record found: DNSResult::name:_ldap._tcp.example.com.,type:33,class:1,rdata={priority:0,port:389,weight:100,server:ipa1.example.com.}
[Kerberos realm search]
Search DNS for TXT record of _kerberos.example.com.
DNS record found: DNSResult::name:_kerberos.example.com.,type:16,class:1,rdata={data:TESTSITE.ATG.SE}
Search DNS for SRV record of _kerberos._udp.example.com.
DNS record found: DNSResult::name:_kerberos._udp.example.com.,type:33,class:1,rdata={priority:0,port:88,weight:100,server:ipa1.example.com.}
DNS record found: DNSResult::name:_kerberos._udp.example.com.,type:33,class:1,rdata={priority:0,port:88,weight:100,server:ipa2.example.com.}
[LDAP server check]
Verifying that ipa2.example.com (realm TESTSITE.ATG.SE) is an IPA server
Init LDAP connection with: ldap://ipa2.example.com:389
Search LDAP server for IPA base DN
Check if naming context 'dc=example,dc=com' is for IPA
Naming context 'dc=example,dc=com' is a valid IPA context
Search for (objectClass=krbRealmContainer) in dc=example,dc=com (sub)
LDAP Error: Anonymous access not allowed
Discovery result: NO_ACCESS_TO_LDAP; server=None, domain=example.com, kdc=ipa1.example.com,ipa2.example.com, basedn=dc=example,dc=com
Validated servers: ipa2.example.com
will use discovered domain: example.com
IPA Server not found
Unable to find IPA Server to join
Installation failed. Rolling back changes.
IPA client is not configured on this system.


Version-Release number of selected component (if applicable):
ipa-client-3.0.0-26.el6_4.2.x86_64


How reproducible:
Always


Steps to Reproduce:
1. disable anonymous access to ldap on IPA server
# ldapmodify -x -D "cn=Directory Manager" -w <secret> -h localhost -p 389
<pgustafs> dn: cn=config
<pgustafs> changetype: modify
<pgustafs> replace: nsslapd-allow-anonymous-access
<pgustafs> nsslapd-allow-anonymous-access: rootdse

2. install ipa-client-3.0.0-26.el6_4.2.x86_64 on ipa client machine
3. Execute unattended ipa-client installation on ipa client machine
# /usr/sbin/ipa-client-install -p admin -w somepass --mkhomedir -dd -U
  
Actual results:
ipa-client-install fails with:
/usr/sbin/ipa-client-install was invoked with options: {'domain': None, 'force': False, 'krb5_offline_passwords': True, 'primary': False, 'mkhomedir': True, 'create_sshfp': True, 'conf_sshd': True, 'on_master': False, 'conf_ntp': True, 'ca_cert_file': None, 'ntp_server': None, 'principal': 'admin', 'hostname': None, 'no_ac': False, 'unattended': True, 'sssd': True, 'trust_sshfp': False, 'dns_updates': False, 'realm_name': None, 'conf_ssh': True, 'server': None, 'prompt_password': False, 'permit': False, 'debug': True, 'preserve_sssd': False, 'uninstall': False}
missing options might be asked for interactively later
Loading Index file from '/var/lib/ipa-client/sysrestore/sysrestore.index'
Loading StateFile from '/var/lib/ipa-client/sysrestore/sysrestore.state'
[IPA Discovery]
Starting IPA discovery with domain=None, servers=None, hostname=31075-01.example.com
Start searching for LDAP SRV record in "example.com" (domain of the hostname) and its sub-domains
Search DNS for SRV record of _ldap._tcp.example.com.
DNS record found: DNSResult::name:_ldap._tcp.example.com.,type:33,class:1,rdata={priority:0,port:389,weight:100,server:ipa2.example.com.}
DNS record found: DNSResult::name:_ldap._tcp.example.com.,type:33,class:1,rdata={priority:0,port:389,weight:100,server:ipa1.example.com.}
[Kerberos realm search]
Search DNS for TXT record of _kerberos.example.com.
DNS record found: DNSResult::name:_kerberos.example.com.,type:16,class:1,rdata={data:TESTSITE.ATG.SE}
Search DNS for SRV record of _kerberos._udp.example.com.
DNS record found: DNSResult::name:_kerberos._udp.example.com.,type:33,class:1,rdata={priority:0,port:88,weight:100,server:ipa1.example.com.}
DNS record found: DNSResult::name:_kerberos._udp.example.com.,type:33,class:1,rdata={priority:0,port:88,weight:100,server:ipa2.example.com.}
[LDAP server check]
Verifying that ipa2.example.com (realm TESTSITE.ATG.SE) is an IPA server
Init LDAP connection with: ldap://ipa2.example.com:389
Search LDAP server for IPA base DN
Check if naming context 'dc=example,dc=com' is for IPA
Naming context 'dc=example,dc=com' is a valid IPA context
Search for (objectClass=krbRealmContainer) in dc=example,dc=com (sub)
LDAP Error: Anonymous access not allowed
Discovery result: NO_ACCESS_TO_LDAP; server=None, domain=example.com, kdc=ipa1.example.com,ipa2.example.com, basedn=dc=example,dc=com
Validated servers: ipa2.example.com
will use discovered domain: example.com
IPA Server not found
Unable to find IPA Server to join
Installation failed. Rolling back changes.
IPA client is not configured on this system.



Expected results:
ipa-client-install should finish without prompting for information 

Additional info:

Comment 1 Martin Kosek 2013-03-18 16:50:41 UTC
Note: client discovery now only works if nsslapd-allow-anonymous-access is set to on or off. When set to rootdse, it breaks.

Comment 2 Rob Crittenden 2013-03-18 18:20:04 UTC
Upstream ticket:
https://fedorahosted.org/freeipa/ticket/3519

Comment 7 Martin Kosek 2013-03-20 08:34:44 UTC
Fixed upstream:

master:
be54d1deb5e40945e4ead5b34d9acde88c1e8264 ipa-client discovery with anonymous access off

ipa-3-1:
dda3cd1b1c94c764d774110789dff8899ff873c8 ipa-client discovery with anonymous access off

Comment 13 Namita Soman 2013-09-05 18:27:49 UTC
Verified using ipa-client-3.0.0-33.el6.x86_64

:: [   PASS   ] :: Running 'yum install -y openldap-clients' (Expected 0, got 0)
:: [   PASS   ] :: Create a resolv.conf file pointing to IPA DNS (Expected 0, got 0)
search testrelm.com
nameserver 10.16.98.183
modifying entry "cn=config"

:: [   PASS   ] :: Setting nsslapd-allow-anonymous-access to rootdse on ipaqa64vmb.testrelm.com (Expected 0, got 0)
/usr/sbin/ipa-client-install was invoked with options: {'domain': None, 'force': False, 'krb5_offline_passwords': True, 'primary': False, 'mkhomedir': True, 'create_sshfp': True, 'conf_sshd': True, 'on_master': False, 'conf_ntp': True, 'ca_cert_file': None, 'ntp_server': None, 'principal': 'admin', 'hostname': None, 'no_ac': False, 'unattended': True, 'sssd': True, 'trust_sshfp': False, 'dns_updates': False, 'realm_name': None, 'conf_ssh': True, 'force_join': False, 'server': None, 'prompt_password': False, 'permit': False, 'debug': True, 'preserve_sssd': False, 'uninstall': False}
....
<snip>
....

Client configuration complete.

:: [   PASS   ] :: Running 'ipa-client-install -p admin -w Secret123 --mkhomedir -dd -U' (Expected 0, got 0)
:: [   PASS   ] :: File '/var/log/ipaclient-install.log' should contain 'Client configuration complete.' 
'042ce99f-0ffa-4874-bb47-3cb0823f7e20'
unattended-ipa-client-installation-fails-when-anonymous-access-to-LDAP-is-disabled-on-IPA-servers-bz952741 result: PASS

Comment 15 errata-xmlrpc 2013-11-21 20:51:51 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, 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-2013-1651.html