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!

In reply to 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.