Bug 585802

Summary: Problems installing RPMs with LDAP auth configured
Product: Red Hat Enterprise Linux 5 Reporter: cavanaug <cavanaughwww+public>
Component: nss_ldapAssignee: Nalin Dahyabhai <nalin>
Status: CLOSED WORKSFORME QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: cavanaughwww+public, jplans
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-06-30 14:38:34 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:

Description cavanaug 2010-04-26 05:42:56 UTC
Description of problem:

I encountered a hang while installing nagios-nrpe on a LDAP authentication enabled system.   The hang was associated with the useradd command.  

Specifically.

 /usr/sbin/useradd -r -d /var/log/nagios -s /bin/sh -c nagios nagios

Only way to get the above command to work was to remove the "ldap" fields from /etc/nsswitch.conf

I was surprised this was a problem as I have pam_min_uid set at 5000 set in /etc/ldap.conf so with the -r flag it shouldnt have even gone to ldap while adding this account.


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


How reproducible:


Steps to Reproduce:
1. configure auth to an ldap server, w/o admin ability to create account in ldap
2. attempt to install any rpm that creates a service account
3. watch it hang
  

Additional info:

Comment 1 Nalin Dahyabhai 2010-06-30 14:38:34 UTC
This delay most likely occurs when useradd attempts to find an unused UID to assign to the new nagios account.  Basically, it has to guess by choosing a UID, checking if there's already a user with that ID, and if there is, checking the next higher one, continuing until it finds one that isn't used.  It can take a while, but I believe that tweaking the UID_MIN and UID_MAX values in /etc/login.defs to adjust the range which useradd checks will solve this.  Marking this works-for-me because I believe it's solvable in the configuration.