LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



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

Rep: Reputation: 31
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!

Running
Code:
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 PADL.com.
The slapd process is running fine.
I can see everything with an
Code:
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).

Code:
slapcat
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:
Code:
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:
OpenLDAP
nss_ldap

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

Rep: Reputation: Disabled
So many unknowns.
What is the output from
Code:
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.

Eric
 
Old 06-27-2006, 03:19 AM   #3
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Original Poster
Rep: Reputation: 31
Output from:
Code:
cat /etc/ldap.conf | grep -v "^#" |grep -v "^$"
Quote:
@(#)$Id: ldap.conf,v 2.47 2006/05/15 08:13:44 lukeh Exp $
host 127.0.0.1
base dc=mydomain,dc=com
Output from:
Code:
cat /etc/openldap/ldap.conf | grep -v "^#" |grep -v "^$"
Quote:
host 127.0.0.1
base dc=mydomain,dc=com
Quote:
How did you configure nss_ldap before you ran make?
I did:
Code:
./configure --prefix=/etc --sysconfdir=/etc --localstatedir=/var
make
make DESTDIR=/tmp/package/nss_ldap install
cd /tmp/package/nss_ldap
mkdir install
cat << EOF > install/slack-desc
...
EOF
makepkg -l y -c n /tmp/nss_ldap-2.51-noarch-1pjg.tgz
installpkg /tmp/nss_ldap-2.51-noarch-1pjg.tgz
Note:
I have done the exact same procedure on both a desktop running kernel 2.6.16.18, 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 03:23 AM.
 
  


Reply


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 12:22 PM
nss_ldap, can't contact LDAP server! mesh2005 Linux - Networking 3 12-06-2005 02:22 AM
passwd command not working donovana Linux - General 3 03-09-2005 02:45 PM
OpenLDAP, nss_ldap, pam_ldap and shadow account info pshinpaugh Linux - General 2 08-16-2004 09:13 AM
getent passwd and wibinfo -u not working bahadur Linux - Networking 0 06-14-2004 01:20 AM


All times are GMT -5. The time now is 11:44 PM.

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