By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,279 Members | 1,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,279 IT Pros & Developers. It's quick & easy.

Expiring a Password after time limit has elapsed

P: 2
Hello.

I am still relatively new to perl and have hit a few bumps along my way to finishing my program. Some background to my question: There are two files: info.html and run.cgi. A user navigates to http://www.mysite.com/info.html and enters a user ID. The user ID is given to run.cgi, which creates a temporary, random password on a remote server. I output the userID, the time of the request, and the server name to a log file.

Currently, I am using a cron to run another script, pass.pl, every minute. pass.pl simply checks the time the password was created (from the log file) and compares it to the current time. Once the password is one hour old, pass.pl generates a new, random password and renders the user's account inaccessible.

Is there another way to perform this password change/time checking? A cron runs continuously, and I would like to try something a little more efficient. I was thinking of starting the pass.pl script at the end of the run.cgi script. I don't know if that is the correct route to go, and was hoping someone would assist me in finding another way to change the password. I've heard of using a daemon, but how would I go about doing this from within the current cgi file?

Ideally, I would want to have a new script checking the password's time, and running the pass.pl script after one hour. The new script would automatically be activated after the run.cgi is processed, and would stop after one hour.

How would I go about doing this?

Thanks in advance!
Jan 18 '08 #1
Share this Question
Share on Google+
1 Reply


numberwhun
Expert Mod 2.5K+
P: 3,503
Hello.

I am still relatively new to perl and have hit a few bumps along my way to finishing my program. Some background to my question: There are two files: info.html and run.cgi. A user navigates to http://www.mysite.com/info.html and enters a user ID. The user ID is given to run.cgi, which creates a temporary, random password on a remote server. I output the userID, the time of the request, and the server name to a log file.

Currently, I am using a cron to run another script, pass.pl, every minute. pass.pl simply checks the time the password was created (from the log file) and compares it to the current time. Once the password is one hour old, pass.pl generates a new, random password and renders the user's account inaccessible.

Is there another way to perform this password change/time checking? A cron runs continuously, and I would like to try something a little more efficient. I was thinking of starting the pass.pl script at the end of the run.cgi script. I don't know if that is the correct route to go, and was hoping someone would assist me in finding another way to change the password. I've heard of using a daemon, but how would I go about doing this from within the current cgi file?

Ideally, I would want to have a new script checking the password's time, and running the pass.pl script after one hour. The new script would automatically be activated after the run.cgi is processed, and would stop after one hour.

How would I go about doing this?

Thanks in advance!
What about the suggestion made from your cross posting of this question?
Jan 18 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.