On 5/11/07, Mark Par <mrbpar@gmail.com> wrote:
>
> I'm getting an error using the -y switch for the ldapsearch, ldapadd,
> and ldapmodify programs when specifying the password. I do, however,
> get positive results when using the -w switch.
> I am using NetBSD 3.1.0_PATCH and OpenLDAP 2.3.32 compiled from the
> packages collection (pkgsrc). Could anyone provide some hints?
Here's what I had to do on solaris for -y to work:
printf "PassWord" >> passwdfile
If you truss (ktruss on netbsd) you will see that ldapsearch doesn't
chomp the \n from the passwdfile and the newline (Will show up as a $
at the end if you cat -vet passwdfile) is added to the password for
the bind, thus the failure.
When you cat -vet your file, it should have no control characters at all.
Also make sure the permissions are correct.