This content has been marked as final. Show 11 replies
you could use the password on command line also with the dsconf command, the only difference is that in the dsconf/dsadm commands the -w IS NOT referring to a 'password in clear' but to a 'password file'... so, if your password is admin123 then you could create your password file:
# echo admin123 > /path/to/your/protected/pwd.file
then, you could use the following command:
# ./dsconf info -h <HOST> -p <PORT> -D "cn=Directory Manager" -w /path/to/your/protected/pwd.file
the 'ldapsearch' equivalent, just to know which is the total number of the entries is:
# ldapsearch -b "<YOUR_SUFFIX>, cn=ldbm database, cn=plugins, cn=config" -D "cn=Directory Manager" -w password -p <PORT> -h <HOST> -1 -T cn=monitor ldapentrycount
Thanks again Marcos, I have other question.
ldapsearch -D "cn=Directory Manager" -w admin123 -h localhost -p 389 -1 -T -b "cn=clarochile,cn=ldbm database,cn=plugins,cn=config" cn=monitor entrycachehits
make the searched in the server with port 389
but, I can put two ports together with ldapsearch
You're welcome ;-)
No, unfortunately you cannot put a 'list of ports' in an ldapsearch command, you would need to 'script', maybe using a bash shell script like:
for MY_PORT in "389 1389 11389 12389 ... ";
ldapsearch -D "cn=Directory Manager" -w admin123 -h localhost -p $MY_PORT -1 -T -b "cn=clarochile,cn=ldbm database,cn=plugins,cn=config" cn=monitor entrycachehits
Please bear in mind that this is just an example, there are PLENTY of ways to improve it ;-)
Just, I'm programming an script for monitor =)
Hehehe, I guessed that!!
P.S.: So could also this thread be considered "answered" ? ;-)
I'm still 'insisting' to mark the correct/helpful answers, so that when a user searches the forum he may quickly identify the solutions.
hmmm... In the thread list I still can see this one as 'NOT ANSWERED' ... am I wrong?
Yup, absolutely a great script!
I echo Marco's comment, it is really a very nice script, and I am using "by default" on my all servers. However, you didn't put your name on that script, can I have your full name to associate your name with the script?
Re: ns-slapd process is using 99% CPU.
Properly speaking it's both my work (Chris Case) and Bill Hathaway's.