> -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf Christopher Adams > Sent: Wednesday, August 12, 2009 12:40 PM > To: [email protected] > Subject: [ldap] question about ldapsearch and authentication
> I am new to ldap syntax, so please bear with me. > I am trying to harvest data from a remote ldap server. I have credentials to do this, but it is not working for me. > I can query it anonymously, but only get the default 1000 records. > Here is what I have. I have substituted dummy host names, user, and password. > ldapsearch -h remoteserver.com -p 389 -x -b "ou=admin,dc=state,dc=or,dc=us" -D "cn=remoteuser" -w remotepasswd > When I do this, I get: ldap_bind: Invalid credentials > If I don't use the password, and instead us -W, I get prompted for a password, enter it and get the same result. > I can do this using a GUI, so I know that the credentials work. > Can someone give me some tips? Thanks. Do you have special chararacters or spaces in the password? If so, try putting single quotes around the password on the ldapsearch command line -- e.g. -w 'remotepasswd'. If you have admin privileges and use tcpdump or wireshark, you can see the parameters that are actually being sent to the ldap server, and can compare the command line version to the GUI version. Fred Younger [email protected]
