Bug 587306 - Authentication is slow and large number of queries to AD from nslcd
Summary: Authentication is slow and large number of queries to AD from nslcd
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: nss-pam-ldapd
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Nalin Dahyabhai
QA Contact: Ondrej Moriš
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-29 15:04 UTC by Karan Rai
Modified: 2010-11-11 14:51 UTC (History)
3 users (show)

Fixed In Version: nss-pam-ldapd-0.7.4-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-11 14:51:47 UTC
Target Upstream Version:


Attachments (Terms of Use)
nslcd.log (10.40 KB, text/x-log)
2010-04-29 15:05 UTC, Karan Rai
no flags Details

Description Karan Rai 2010-04-29 15:04:36 UTC
Description of problem:
Slowness to authenticate user against windows active directory using LDAPS.
Large number of queries to AD from nslcd

Version-Release number of selected component (if applicable):
nss-pam-ldapd-0.7.2-1.el6.x86_64
pam_ldap-185-1.el6.x86_64

How reproducible:

1 Setup rhel6 to authenticate against ms AD using system-config-authentification
+ modifying /etc/nslcd.conf, /etc/openladp/ldap.conf and /etc/pam_ldap.conf to add rootbinddn and password, the tls_chekcpeer and ssl on.

2 Stop nslcd

3 Start nslcd in foreground

4 Try to sudo su - <a username from AD and against AD>  
 
Actual results:
It works but is slow (30 seconds)  
The output from nslcd is very verbose and show a lot of time the same query.

Expected results:
Faster connection.
Less queries on AD.

Additionnal :
Maybe have system-config-authentication to have a box to setup the proxy username and password?

Comment 1 Karan Rai 2010-04-29 15:05:44 UTC
Created attachment 410140 [details]
nslcd.log

Comment 3 RHEL Program Management 2010-04-29 16:27:27 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 4 Nalin Dahyabhai 2010-04-29 16:51:17 UTC
Have you turned on nscd?  This seems to be the sort of problem it's designed to solve.

Comment 5 Charles Castelain 2010-04-30 07:49:54 UTC
Hello,

It is rather unclear about the role of nslcd.
Is it a replacement for nscd?
Is it a complement?
If it is a complement so what is the role for sssd inside nslcd?
And also why isn't nscd anymore installed by default for a "default workstation"?

Regards,

Charles

Comment 6 Nalin Dahyabhai 2010-04-30 15:22:07 UTC
(In reply to comment #5)
> Hello,
> 
> It is rather unclear about the role of nslcd.
> Is it a replacement for nscd?
> Is it a complement?

nslcd is the LDAP client daemon -- the libnss_ldap.so that comes with it asks nslcd to do the heavy lifting when an application needs information.  It is not a replacement for nscd, so you can definitely benefit from turning nscd on when you're using nslcd.

> If it is a complement so what is the role for sssd inside nslcd?

sssd and nslcd aim to solve an overlapping set of problems; neither depends on the other.  nslcd is concerned with LDAP, while sssd aims to handle multiple protocols, LDAP being one of them (that's an oversimplification, but it'll do for now).  They both have a system daemon doing the hard work on behalf of multiple local client processes.

> And also why isn't nscd anymore installed by default for a "default
> workstation"?

I'm not sure.  If it wasn't in the default package set, then nss_ldap would have pulled it onto the system as an explicit dependency.  The current packaging for nss-pam-ldapd doesn't do that, but I have no strong feelings against doing so.  If it was in the default set but isn't now, that's probably a question for the beta's mailing list.

Comment 8 Nalin Dahyabhai 2010-05-17 19:45:01 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > And also why isn't nscd anymore installed by default for a "default
> > workstation"?
> 
> I'm not sure.  If it wasn't in the default package set, then nss_ldap would
> have pulled it onto the system as an explicit dependency.  The current
> packaging for nss-pam-ldapd doesn't do that, but I have no strong feelings
> against doing so.

I'm going to make the nss-pam-ldapd package explicitly require the nscd package.  It won't take the step of enabling nscd by default, but I think we either have to leave that to the administrator or have authconfig do it.  But then authconfig currently prefers sssd which implements its own caching, so we probably have to leave it to the admin.

Comment 11 releng-rhel@redhat.com 2010-11-11 14:51:47 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.


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