Craig White wrote: > I am surprised I haven?t tripped over this before. > ldapsearch ?b ou=people, etc. uid pwdChangedTime mail > Wanting to e-mail people with expiring passwords. > I am counting on 4 lines for each person? > Dn: > UID: > pwdChangedTime: > mail: > in this exact order > but on the last one (which happens to be me, perhaps because I was the last > one to change my password), my ?mail? attribute was returned before the > pwdChangedTime attribute which would cause me to re-write the code to handle > randomness of order of the output. Do I have to re-write my bash script? Yes, you have to handle arbitrary order. => I'd recommend to use a better scripting language with a decent LDAP module for tasks like this. If you insist on using a shell script look here: http://ltb-project.org/wiki/documentation/ldap-scripts/checkldappwdexpiration I have no personal experience with it though. Ciao, Michael.
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature