Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1008359]
shmem flollops

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2018-03-23 11:38 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (290 votes). Check out past polls.