James Zeng Contributor.
Contributor.
140 views

How can I connect to a LDAP server with my DN?

I tried to connect my edirectory LDAP with NDS access.

But it's hard for me to get the correct Base DN to connect.

After trying many combinations of OU and O as DN, the access was always failed and returned DN syntax error.

Could someone help me to get the correct value to connect?

Or where can I check my DN for access?

My tree image is attached.

Thank you!

Labels (1)
0 Likes
2 Replies
Knowledge Partner
Knowledge Partner

Re: How can I connect to a LDAP server with my DN?

What are you trying to accomplish? Doing searches with ldapsearch? If so, what does "base DN to connect" mean? The searchbase (i.e. the argument for the "-b" parameter)? Or the bind-DN (as specified with "-D")?

Generally you can specify the entire tree as a searchbase, in your case with something like

-b t=server2016_tree

The bind-DN would be specified like this

-D cn=admin,o=org

If your binding user would reside in the "test for authpoint" OU you'd have to take special care for the withespaces either by escaping them with backslashes or by using quotation marks for the entire DN.

ldapsearch -x -h x.x.x.x -b t=server2016_tree -s sub -D cn=admin,ou=test\ for\ authpoint,o=org -W "objectClass=inetOrgPerson" dn

or

ldapsearch -x -h x.x.x.x -b t=server2016_tree -s sub -D "cn=admin,ou=test for authpoint,o=org" -W "objectClass=inetOrgPerson" dn

 

0 Likes
James Zeng Contributor.
Contributor.

Re: How can I connect to a LDAP server with my DN?

Thank you Mathiasbraun, you made me get a clearer idea to use the user DN to connect the server.

I was used to use the only username to connect the server just as what I did with Active Directory which making me always failed on this way.

Thanks,

James

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.