NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Using LDAP for auth against LINUX

matthew sporleder wrote:
On Tue, Jan 6, 2009 at 6:56 AM, Uwe Lienig
<> wrote:

$ > uname -a
NetBSD host 3.0 NetBSD 3.0 (GENERIC) #0

Since the change is in progress this server uses the old NIS databases to auth
users. But in the near future I have to switch to LDAP. The old NIS databases
are to be switched off.

So I installed the missing bits for LDAP, namely


LDAP was configured with


The entries i added are
 BASE       dc=some,dc=domain,dc=org
 URI        ldap://ldap.server
 TLS_CACERT /path/to/cert.pem

Using ldapsearch I can perfectly query the LDAP database and get the user 

After verify the LDAP setup working ok I went ahead with configuring NSS and
PAM. This is where I'm now and stuck, since I can't get that to work as 

In order not to break the current setup I left NIS as is (there shouldn't be any
problem using both NIS and LDAP, however). The was linked from
/usr/pkg/lib/security to /usr/lib/security. To get the configuration working I
used the HowTo from
nsswitch.conf got the ldap entries added

group:          files nis ldap
passwd:         files nis ldap

and /etc/pam.d/system was populated with ldap entries

auth      sufficient
auth      sufficient     no_warn try_first_pass
auth      required     no_warn try_first_pass nullok
account   sufficient
account   required
account   required
session   sufficient
session   required  no_fail no_nested
password  sufficient
password  sufficient     no_warn try_first_pass
password  required     no_warn try_first_pass

I created /usr/pkg/etc/nss_ldap.conf and sym linked pam_ldap.conf to this file.

I do have a user entry in LDAP that does not exist in NIS. But whatever I try I
can't get getent(1) to produce output for this user (although NIS works ok for
other users).

Up to now I haven't made any step further.

What am I missing? Please feel free to ask for config data I have not provided
in this mail. I think LDAP isn't the problem since ldapsearch produces correct
output, though.

Any hints are very much appreciated.

Watch the logs on the ldap server when you use getent to see if it is
actually performing the search, or even trying to connect.

Also- what happens when you switch ldap to be before nis?

I didn't think that NetBSD version 3 supported ldap in nsswitch.conf. But maybe I remember wrong?


Home | Main Index | Thread Index | Old Index