What is the remote system that the accounts are created on? Does it have any password expiration feature that you could use? How I'd normally handle this if I were writing the authentication mechanisms (and it sounds like maybe you're not) is to store the expiration time with the password and check it at the time the user tries to gain access.

If you can't do that, and you really want to have a daemon, look at fork and Proc::Daemon. What you'll do is create the account, fork off a daemon, and the daemon will sleep until the expiration time, at which point it can handle the expiration.

It sounds as if what you're doing now is working, though. I don't know how active this system is, but if it's very active with many accounts in an "about to expire" state, then you're going to have a sleeping daemon for each. That could be quite a waste of memory. Also, if the system dies, the daemons die with it, and all your expiration information goes out the window.

Just some things to think about.


In reply to Re: Expiring password after a time limit has elapsed by kyle
in thread Expiring password after a time limit has elapsed by 3SRT

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.