473,388 Members | 1,375 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Expiring a Password after time limit has elapsed

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
1 2188
numberwhun
3,509 Expert Mod 2GB
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

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

Similar topics

4
by: Lobang Trader | last post by:
Hi all, I am trying to create a username and a password class. I would like to know what are the RECOMMENDED minimum and maximum length for both fields? These fields will be something like...
15
by: kpp9c | last post by:
I am kind of in a bit of a jam (okay a big jam) and i was hoping that someone here could give me a quick hand. I had a few pages of time calculations to do. So, i just started in on them typing...
2
by: Elroyskimms | last post by:
The form has two text fields... one called txtEmail and one called txtPassword. The username is the email address (txtEmail) and the password is txtPassword. Storing cookie using the following...
6
by: Adam | last post by:
On an xp machine, the caching works as expected. I have deployed to a win2k server, and an item I add to the cache expires almost immediately some times and in under a minute in other times. The...
2
by: DWalker | last post by:
In Visual Studio (Visual Basic) .NET 2002, I noticed that this: Dim Elapsed as DateTime = Now - Now gives a "compile time" error (error in the IDE), saying that the '-' operator is not...
8
by: Katash | last post by:
Hello, I am new to PHP and am working on a login system for my site, currently supplied passwords are passed to MySQL and stored as md5 hashes, my question is :- seeing as md5 is 1 way only what...
30
by: diane | last post by:
I've got an application running with table-based security: i capture the user's windows login with fOsusername, then have them enter a password checked against their username/login in my own table....
6
by: Mikhail Kovalev | last post by:
I'm using set_time_limit() to set maximum execution time. Is there a way to check how much time is left at any time during the execution itself?
5
by: p3rk3le | last post by:
So, I'm about to do a sequential search on a table (n contents) of random numbers. I have to print the average between the number of comparisons and the contents of the table (n) and the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.