Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 06-26-2006, 06:58 PM   #1
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
nss_ldap not working (getent passwd)

So after reading an LDAP book by oreilly, and playing with several test computers, here's where I'm at.

I cannot get nss_ldap to work!

getent passwd
only returns results from /etc/passwd, and nothing from my running LDAP server.

I have migrated all my user/group accounts into the running ldap server using the Migration tools from
The slapd process is running fine.
I can see everything with an
ldapsearch -x "(objectClass=posixAccount)"
My /etc/openldap/ldap.conf file is setup correctly (used by ldapsearch).

My /etc/ldap.conf file is also setup correctly (per the book, and about 20 online tutorials).

shows all of my directory's contents.

My /etc/nsswitch.conf file has the following entries:
passwd: ldap compat
group: ldap compat

I know it's not querying ldap because:
1. I added a new user into the ldap directory and it's not showing.
2. I modified an existing user's home directory in LDAP, and it's showing old value (from /etc/passwd).
3. When I remove the 'compat' entry from nsswitch.conf, I get absolutely no output from:
getent passwd
Any ideas??? I'm open to just about anything at this point. If you want to see the config files, just let me know.

Thanks in advance.

PS: I compiled all the software on this same computer (no errors), created the slackpacks, which I then installed, on the computer. This includes:

Last edited by WindowBreaker; 06-26-2006 at 07:01 PM.
Old 06-27-2006, 12:51 AM   #2
Alien Bob
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 6,612

Rep: Reputation: 3903Reputation: 3903Reputation: 3903Reputation: 3903Reputation: 3903Reputation: 3903Reputation: 3903Reputation: 3903Reputation: 3903Reputation: 3903Reputation: 3903
So many unknowns.
What is the output from
cat /etc/ldap.conf | grep -v "^#" |grep -v "^$"
What is in your /etc/openldap/ldap.conf?
How did you configure nss_ldap before you ran make?
I don't know the content of your LDAP database, but if you first post answers to the above, we can go from there.

Old 06-27-2006, 02:19 AM   #3
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Original Poster
Rep: Reputation: 40
Output from:
cat /etc/ldap.conf | grep -v "^#" |grep -v "^$"
@(#)$Id: ldap.conf,v 2.47 2006/05/15 08:13:44 lukeh Exp $
base dc=mydomain,dc=com
Output from:
cat /etc/openldap/ldap.conf | grep -v "^#" |grep -v "^$"
base dc=mydomain,dc=com
How did you configure nss_ldap before you ran make?
I did:
./configure --prefix=/etc --sysconfdir=/etc --localstatedir=/var
make DESTDIR=/tmp/package/nss_ldap install
cd /tmp/package/nss_ldap
mkdir install
cat << EOF > install/slack-desc
makepkg -l y -c n /tmp/nss_ldap-2.51-noarch-1pjg.tgz
installpkg /tmp/nss_ldap-2.51-noarch-1pjg.tgz
I have done the exact same procedure on both a desktop running kernel, and a laptop running kernel 2.4.31 . The 'getent passwd' command works perfectly on the desktop. The only problem is with the laptop. I thought maybe it was a problem related to the contents of my directory. So I recreated the laptop's directory using an LDIF file will all entries from the desktop, still not working. I've tried comparing everything I can between the two (config files mainly), and can't tell why the desktop works, and the laptop doesn't.

I had to compile/create a slackpack for OpenLDAP on the laptop, as the one built on a 2.6 kernel (desktop) wouldn't work due to the 2.4 kernel lacking the 'epoll' function. But that was done before I did anything else. And just in case, I also compiled nss_ldap on the laptop also.

Last edited by WindowBreaker; 06-27-2006 at 02:23 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SAMBA getent passwd command doesnt list all the users loganking Linux - Software 0 06-14-2006 11:22 AM
nss_ldap, can't contact LDAP server! mesh2005 Linux - Networking 3 12-06-2005 01:22 AM
passwd command not working donovana Linux - General 3 03-09-2005 01:45 PM
OpenLDAP, nss_ldap, pam_ldap and shadow account info pshinpaugh Linux - General 2 08-16-2004 08:13 AM
getent passwd and wibinfo -u not working bahadur Linux - Networking 0 06-14-2004 12:20 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration