Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Finding Last Password Change Time In OpenLDAP

by Anonymous Monk
on Dec 11, 2012 at 17:50 UTC ( #1008359=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am using OpenLDAP (a newbie where it is concerned) and so far, so good. I have it set such that users can change their own password. I then thought I would whip up a quick perl script to send a friendly email reminder to users several days before their password is set to expire (I did something similar some time back only with Active Directory as the LDAP server). The problem is I can't even figure out how to find the last time a user's password was changed in OpenLDAP? If I could figure that out, I could probably come up with something in Perl to find it. I can use ldapsearch and see user attributes including the password hash but I don't see anything showing when the password was last changed?

After Googling for a while, still no luck so I thought I would give this a try. I realize it is not entirely a Perl question, but I'm hoping someone knows how to do this and perhaps has already done something similar in Perl?

Thank you in advance.

Comment on Finding Last Password Change Time In OpenLDAP
Re: Finding Last Password Change Time In OpenLDAP
by hominid (Curate) on Dec 11, 2012 at 20:29 UTC
    Don't know about OpenLDAP, but our EDirectory stores the password expiration date as "passwordExpirationTime" in Greenwich Mean Time and yyyyMMddhhmmss format. We use that to calculate the days til expiration and send email notices accordingly.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1008359]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (14)
As of 2014-12-17 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (33 votes), past polls