I found out that the nss_ldap queries works with getent hosts xyz but not with ping xyz
ping (and e.g. traceroute) hangs somewhere within ldap_init ( libnss_ldap with debugging stops after: "nss_ldap: ==> ldap_init" ) and futex ( strace stops at "futex(0x375a8c, FUTEX_WAIT, 2, NULL" )
Works for me, but...
Might that be because ping is SUID root? Try running the command when you're logged in as root, when SUID shouldn't have any effect.