[Date Prev][Date Next] [Chronological] [Thread] [Top]

using -y option for ldapsearch



Hi All,

 

I am trying and writing a script to use ldapsearch. But I want to create a password file and use the “-y” option. I am unable to figure out how to create one.

 

==================================
ldapsearch -x -h <Machine> -p <port> -s one -D <CN> -b <BASE_DN> -y pwdfile -v "(&(cn=fm*))" cn

==================================

 

I tried the following.

1)       I tried putting the plaintext password for <CN> in the file and it did not work.

2)       I ran slappasswd to generate the hashed password for <CN> and directed the output to this file and it did not work.

3)       The file permissions I tried are 700 and 600.

 

What is this “-y” option and am I interpreting it correctly? Is there a specific format that this file should be in?

 

Version Info:

==================================
$ rpm -qa|egrep openldap

openldap-clients-2.2.13-12.el4

openldap-2.2.13-12.el4

openldap-devel-2.2.13-12.el4

openldap-servers-2.2.13-12.el4

$

==================================

 

Any help is greatly appreciated.

 

-Sai