PaulDotCom mailing list archives

Re: ldapsearch in monitoring script without bind password written in script


From: Just Dave <justdaver () gmail com>
Date: Fri, 23 Sep 2011 14:17:44 +0200

With ldapsearch you can specify a file which contains the bind password:

-y passwdfile

Remember to lock down the permissions of the your password file :)

-
Dave


Hi

I do a very simple monitoring of our OpenLDAP (runs in cronjob and
generate alerts if unsuccessfully)

$ ldapsearch -h hostname.domain -D
"cn=monitor_user,ou=People,dc=organisation" -w "password" -b
"dc=organisation" -x "(&(cn=monitor_user)(ou=People))" dn | grep -v
version

dn: cn=monitor_user,ou=People,dc=organisation

My problem is that the password is written in clear text in script
(see -w "password"). How to do without writing password in UNIX
script?

cheers Sven

_______________________________________________
Pauldotcom mailing list
Pauldotcom () mail pauldotcom com
http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom
Main Web Site: http://pauldotcom.com

Current thread: