base dc=example,dc=com
binddn cn=Admin,dc=example,dc=com
bindpw hogefuga
・・・ nsswitch.conf に ldap を入れると、ldap の起動に異様に時間がかかる・・・なんだろう・・・
runuser: nss_ldap: failed to bind to LDAP server ldap://127.0.0.1: Can't contact LDAP server
とか。ldap が起動する前に ldap を見に行っているようなきがします。FAQな香りがしますが、ググれず・・・
逃げで、file ldap な nsswitch_ldap.conf と、file な nsswitch_file.conf をつくっておいて、/etc/initd.d/ldap を書き換えました。
起動前に command cp /etc/nsswitch_file.conf /etc/nsswitch.conf して、起動後に comnand cp /etc/nsswitch_ldap.conf /etc/nsswitch.conf してます。
/etc/nsswitch_file.conf
passwd: files
shadow: files
group: files
/etc/nsswitch_ldap.conf
passwd: files ldap
shadow: files ldap
group: files ldap
/etc/init.d/ldap
function start() {
command cp -f /etc/nsswitch_file.conf /etc/nsswitch.conf
# 省略
command cp -f /etc/nsswitch_ldap.conf /etc/nsswitch.conf
return $RETVAL
}