Subject: Re: LDAP NSS for NetBSD (old)
To: Petter Lindqvist <pollen@astrakan.hig.se>
From: Jean-Luc Wasmer <jl+netbsd@lists.wasmer.ca>
List: netbsd-users
Date: 10/06/2005 10:23:21
Petter Lindqvist wrote:

> Jean-Luc Wasmer wrote:
>
>> Hubert Feyrer wrote:
>>
>>> On Wed, 21 Sep 2005, iMil wrote:
>>>
>>>> while searching about nss LDAP on NetBSD, i found lots of threads 
>>>> talking about various volunteers, but it seems like this project is 
>>>> being abandonned. Is it ?
>>>
>>>
>>>
>>>
>>> pkgsrc/databases/nss_ldap? 
>>
>>
>>
>>
>> It must me pretty recent... yeah: it was added on August 8 th.
>> cool :-) 
>
>
> Pretty cool yes, but I've been studying this package for a while now, 
> without getting any ideas of how to make it work.
>
> What files other than /etc/nsswitch.conf do I have to alter?
> Who will load /usr/pkg/lib/nss_ldap.so?

In nsswitch.conf, you need to have
passwd:         files ldap
You can put ldap first but I saw scary stuff happening.

You also need to configure:
/usr/pkg/etc/nss_ldap.conf

That file _must_ be readable by any user. You can have a different LDAP 
account to bind to when the effective user ID is root, in that case, its 
password will be looked up in:
/usr/pkg/etc/ldap.secret (mode 600)

Finally, you need to set a symlink:
/usr/lib/nss_ldap.so.0 -> /usr/pkg/lib/nss_ldap.so.1

Jean-Luc