If the DNS domainname is different from the LDAP domainname, change the nsswitch.conf file. In the host entry, specify dnsor put dns before ldap.