ldap_open does set this directly, an underlying library call set errno. The errno may be fairly meaningless as it comes from whatever failed last. It may not actually be indicative of the actual fault. I would suspect the problem is that the specified host is not accessible from this server or that the ldap server is not listening on the specified port. Kurt