compat mode with nss_ldap

From: Gordon Tetlow <gordont_at_gnf.org>
Date: Thu, 24 Apr 2003 13:24:13 -0700
I'm not sure if this is supposed to work, but if I try the following in
my nsswitch.conf:

hosts: files dns
passwd: compat
passwd_compat: ldap
group: compat
group_compat: ldap

I get the following when running id <username>:

gtetlow_at_roark:~$ id <username>
id: <username>: no such user

I ran a truss on it and got the following open calls:
gtetlow_at_roark:~$ grep ^open /tmp/foofoofoo 
open("/var/run/ld-elf.so.hints",0x0,00)          = 3 (0x3)
open("/usr/lib/libc.so.5",0x0,027757773714)      = 3 (0x3)
open("/etc/nsswitch.conf",0x0,0666)              = 3 (0x3)
open("/usr/local/lib/nss_ldap.so.1",0x0,027757770550) = 4 (0x4)
open("/usr/local/lib/libldap.so.2",0x0,027757770510) = 4 (0x4)
open("/usr/local/lib/liblber.so.2",0x0,027757770510) = 4 (0x4)
open("/usr/lib/libssl.so.3",0x0,027757770510)    = 4 (0x4)
open("/usr/lib/libcrypto.so.3",0x0,027757770510) = 4 (0x4)
open("/etc/pwd.db",0x0,00)                       = 3 (0x3)
open("/etc/localtime",0x0,00)                    = 4 (0x4)

So it does seem to be getting the configuration from nsswitch.conf.
But it never opens ldap.conf to get the configuration. A network
sniff also indicates that there isn't any traffic going to the ldap
server. Kinda odd. Works fine if my nsswitch.conf is:

hosts: files dns
passwd: files ldap
group: files ldap

open("/var/run/ld-elf.so.hints",0x0,00)          = 3 (0x3)
open("/usr/lib/libc.so.5",0x0,027757773714)      = 3 (0x3)
open("/etc/nsswitch.conf",0x0,0666)              = 3 (0x3)
open("/usr/local/lib/nss_ldap.so.1",0x0,027757770550) = 4 (0x4)
open("/usr/local/lib/libldap.so.2",0x0,027757770510) = 4 (0x4)
open("/usr/local/lib/liblber.so.2",0x0,027757770510) = 4 (0x4)
open("/usr/lib/libssl.so.3",0x0,027757770510)    = 4 (0x4)
open("/usr/lib/libcrypto.so.3",0x0,027757770510) = 4 (0x4)
open("/etc/pwd.db",0x0,00)                       = 3 (0x3)
open("/etc/ldap.conf",0x0,0666)                  = 3 (0x3)
open("/etc/resolv.conf",0x0,0666)                = 3 (0x3)
open("/etc/hosts",0x0,0666)                      = 3 (0x3)
open("/usr/local/etc/openldap/ldap.conf",0x0,0666) = 3 (0x3)
...

-gordon

Received on Thu Apr 24 2003 - 11:24:17 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:04 UTC