[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: using -y option for ldapsearch
Oops...
At Mon, 01 Jun 2009 22:07:46 +0900,
SATOH Fumiyasu wrote:
> If the pwdfile contains LF (\x0a) or others, strip it.
> OpenLDAP ldap* commands use the entire contents in a pwdfile.
> I think this is a bad design...
>
> Try:
>
> $ (umask 0077; echo -n "DN's password" >pwdfile)
> $
$ ldapsearch -x -h <Machine> -p <port> -s one -D <DN> -b <BASE_DN> -y pwdfile
>
> or:
>
> $ tr -d '\n' <pwdfile \
> |ldapsearch -x -h <Machine> -p <port> -s one -D <DN> -b <BASE_DN> -y /dev/stdin
>
> IIRC, older OpenLDAP ldap* commands cannot use /dev/stdin for
> the -y option.