in reply to Expiring password after a time limit has elapsed

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.

  • Comment on Re: Expiring password after a time limit has elapsed