Figuring out the distinguished name of a specific user in an Active Directory or generic LDAP server can be time-consuming. However, you can use the dsquery.exe utility to quickly list the distinguished names of all users in the Active Directory on a specific host.
To use this utility, log in using an administrative account on the Microsoft Windows system from which you are attempting to retrieve LDAP user and group information, and run the dsquery user command from a command prompt window. You should see output like the following:
C:\>dsquery user
"CN=Administrator,CN=Users,DC=training,DC=local"
"CN=Guest,CN=Users,DC=training,DC=local"
"CN=SUPPORT_388945a0,CN=Users,DC=training,DC=local"
"CN=IUSR_W2K3STDSP1,CN=Users,DC=training,DC=local"
"CN=IWAM_W2K3STDSP1,CN=Users,DC=training,DC=local"
"CN=ASPNET,CN=Users,DC=training,DC=local"
"CN=krbtgt,CN=Users,DC=training,DC=local"
"CN=Joe User,CN=Users,DC=training,DC=local"
"CN=Joe Marketing,CN=Users,DC=training,DC=local"
"CN=Joe Developer,CN=Users,DC=training,DC=local"
"CN=Joe CEO,CN=Users,DC=training,DC=local"
This utility produces one line of output for each user account that is available on the system, and shows the correct syntax to use when identifying a directory.binding-username in the authentication-related settings on a Project's Misc tab.