Hey thanks again... <br>
   Just wanted to give one final update (mostly for anybody
who ends up searching the archives) about the resolution. Turns my
nss_ldap updates were a basic autoconf tools issue. I had previously
used the incorrect configure options and running "make clean" and
re-running configure didn't help. I finally deleted the source,
re-unarchived it, and build + install. Worked great. <br>
<br>
So to recap, for you people running RHEL:<br>
1. Grab latest version of nss_ldap from padl <a href="http://www.padl.com/download/nss_ldap.tgz">http://www.padl.com/download/nss_ldap.tgz</a><br>
2. Extract it. Configure with the following options: (atleast worked for me)<br>
   ./configure --enable-paged-results --enable-rfc2307bis --enable-schema-mapping --with-ldap-lib=openldap<br>
3. make; make install<br>
4. Make minor updates to your /etc/ldap.conf per Josh's suggestion.<br>
   echo 'nss_initgroups_ignoreusers root,ldap' >> /etc/ldap.conf<br>
   Also update the various timeouts to your liking. <br>
<br>
Should be golden.<br>
-- Jon Miller<br>
<br><div><span class="gmail_quote">On 10/17/06, <b class="gmail_sendername">Jon Miller</b> <<a href="mailto:jonebird@gmail.com">jonebird@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thank you! <br>
    I had to upgrade my version of nss_ldap. I was at
version 207 and according to the changelog that option was introduced
at version 245. <br>
   Unfortunately, I have updated built and installed the
latest version and now 'getent passwd' returns nothing. But I think
I'll be able to work through it. <br>
<br>
-- Jon Miller<div><span class="e" id="q_10e574d2884ce822_1"><br><br><div><span class="gmail_quote">On 10/16/06, <b class="gmail_sendername">Joshua Miller</b> <<a href="mailto:joshua@itsecureadmin.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
joshua@itsecureadmin.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You problem is indeed a very common one.  The reason that your login is<br>hanging is that although root is a local account, nss_ldap is looking to<br>find out how many LDAP groups that root belongs to.  To get around this,
<br>you can employ the nss_initgroups_ignoreusers directive to force<br>nss_ldap to not query ldap for root's group membership:<br><br>   nss_initgroups_ignoreusers root,ldap<br><br>As you can see above, I include root and the ldap user so that OpenLDAP
<br>starts up quickly.  I also include three additional directives which aid<br>in the smooth operation of my servers when OpenLDAP is not available.<br><br>  timelimit 15              # Search timelimit<br>  bind_timelimit 15      # Bind timelimit - abort after 15 seconds if fail
<br>to bind<br>  bind_policy soft        # After failing to bind once, do not retry for<br>this request<br><br>I hope you find something here that may work for you.<br><br>- Josh, RHCE<br><br><br>Jon Miller wrote:<br>> Hopefully this is a easy/common problem which I've simply not hit upon
<br>> yet. I have several RHEL 3.0 machines which have setup to authenticate<br>> to a pair of openldap servers. Normally things are fine, but lately<br>> we've had some issues with our LDAP servers where a query would hang in
<br>> the middle. Even worse, the replication server too displayed the same<br>> behavior. Ouch, no logins.<br>> Ideally this scenario would only affect employees logging into the<br>> servers since our applications use locally setup accounts. However, this
<br>> is not the case and our LDAP issue can actually affect local account<br>> authentication as well.<br>><br>> Let me jump straight into a quick test case matrix: ( here, I have<br>> changed my /etc/ldap.conf to point to a couple of bogus servers which
<br>> are merely running netcat to simulate a "hung" ldap query)<br>>                        NSS    
Queried        Successful      |
Comments<br>>                        LDAP    LDAP
?        Login?            |<br>> -----------------------------------------------------------------------------|--------------------<br>>
root login        
No        
No              
Yes                |<br>> pam_unix indirectly querying ldap via nss?<br>>
ldap  login        No        Yes              
No                
|<br>> "illegal user" without nss.<br>> root
login        
Yes      
Yes              
No                
|<br>> queries ldap before giving prompt; ssh timeout.<br>> ldap
login        Yes        Yes              Yes                |<br>> obvious. (only with correct servers in ldap.conf, ofcourse)<br>> legend: "NSS LDAP": No means I only left "files" for the various
<br>> dbs(passwd, shadow, group). Yes means "ldap" is listed second in the<br>> /etc/nsswitch.conf.<br>><br>> The case I am interested in solving is the third. While trying to ssh<br>> into the machine, you are never prompted a password because it is busy
<br>> querying LDAP. Compare that with my first test case with ldap left out<br>> of the nsswitch.conf and the root login succeeds without _ever_<br>> attempting to query our LDAP server.<br>><br>> Here is what my /etc/pam.d/system-auth file looks like:
<br>> #%PAM-1.0<br>> # This file is auto-generated.<br>> # User changes will be destroyed the next time authconfig is run.<br>>
auth        required      /lib/security/$ISA/pam_env.so
debug<br>>
auth        sufficient    /lib/security/$ISA/pam_unix.so
likeauth nullok<br>> audit<br>>
auth        sufficient    /lib/security/$ISA/pam_ldap.so
use_first_pass<br>> debug<br>>
auth        required      /lib/security/$ISA/pam_deny.so
debug<br>><br>> account     required      /lib/security/$ISA/pam_unix.so  debug<br>> account     sufficient    /lib/security/$ISA/pam_localuser.so<br>> account     required      /lib/security/$ISA/pam_ldap.so
<br>><br>> password    required      /lib/security/$ISA/pam_cracklib.so retry=3 type=<br>> password    sufficient    /lib/security/$ISA/pam_unix.so nullok<br>> use_authtok shadow<br>> password    sufficient    /lib/security/$ISA/pam_ldap.so use_authtok
<br>> password    required      /lib/security/$ISA/pam_deny.so<br>><br>> session     requisite     /lib/security/$ISA/pam_mkhomedir.so<br>> session     required      /lib/security/$ISA/pam_limits.so<br>> session     required      /lib/security/$ISA/pam_unix.so
<br>> session     optional      /lib/security/$ISA/pam_ldap.so<br>><br>> I have methodically tested various scenarios and at this point believe<br>> pam_unix is, one way or another, querying LDAP during it's<br>

> pam_sm_authenticate routine. But I have yet to either prove or disprove<br>> that theory. I have the latest (RHEL 3.0) pam-0.75-69 rpm on the machine.<br>><br>> --<br>> Thanks,<br>> Jon<br>><br>>
<br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> Pam-list mailing list<br>> <a href="mailto:Pam-list@redhat.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

Pam-list@redhat.com</a><br>> <a href="https://www.redhat.com/mailman/listinfo/pam-list" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://www.redhat.com/mailman/listinfo/pam-list</a><br><br>
_______________________________________________<br>Pam-list mailing list
<br><a href="mailto:Pam-list@redhat.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Pam-list@redhat.com</a><br><a href="https://www.redhat.com/mailman/listinfo/pam-list" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
https://www.redhat.com/mailman/listinfo/pam-list</a><br></blockquote></div><br><br clear="all">
<br></span></div>-- <br>Later,<br><span class="sg">Jon

</span></blockquote></div><br><br clear="all"><br>-- <br>Later,<br>Jon