1834142 Members
2273 Online
110064 Solutions
New Discussion

Re: ldap client

 
Johan Nielsen
Advisor

ldap client

I have LDAPUX-Client Services installed on an HP-UX 11.0 box. The installation went without errors and the executables that i was looking for (such as ldapsearch) are located in the appropriate directory. I have received Active Directory information from my Windows admin and my goal is to be able to query the AD using ldapsearch from my HP-UX box.

I have very little experience with LDAP (but in the process of learning "LDAP Directories Explained - An Introduction and Analysis" but i have an immediate request that requires me to bypass part of the learing curve.

This is where your help comes in. I have no intensions of modifying AD i simply want to query it. I cannot seem to get the proper ldapquery syntax put together to make this happen. I'm unclear how user/password information gets passed to AD as part of that query - help...!

Thanks in advance...

johan
2 REPLIES 2
Johan Nielsen
Advisor

Re: ldap client

Well, there is nothing like solving your own problem. We hammered through the picky syntax and came up with a query that works. I though I would share the solution with the rest of you.

This solution may be very specific to our environment and may therefore only serve as a starting point for someone else encountering the same trouble.

Using ldapsearch (located: /opt/ldapux/bin) to query our Microsoft Active Directory (AD) domain controller we had to supply the following string.

./ldapsearch -v -h -D \\ -w -b "cn=users, dc=,dc=com" "(&(objectClass=user)(extensionAttribute2=*))" mail,givenName,sn

It works. The thing to remember is that UNIX considers \ something equivilant to an ESC character so two \\ are necessary.

have fun...

johan