I'm creating an application which uses LDAP authentication. However, I'm stuck on the LDAP_SEARCH() function. Basically I need to dynamically create the base_dn from the FQDN (Fully Qualified Domain Name) which the user can specify in the settings.

e.g. DOMAIN.internal

How would I do this?

有帮助吗?

解决方案

You shouldn't. The base object is determined by the directory information tree, and the scope of your search should be as far "down" into the directory information tree as is practicable.. This information comes from the directory administrators. If you need to know which naming contexts are hosted/shadowed by the server, you should query the root DSE. See also: "LDAP: Programming Practices".

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top