Page 1 of 1

Need a new password every 24 hours

Posted: Tue May 19, 2009 12:03 pm
by bettina702
Hi,

Part of the site I am building needs to be secured with a password. That password needs to be changed every 24 hours and e-mailed to several addresses. I do not need a MySql database, just the automated password generation and capability to e-mail it. I am a total newbie to PHP and would appreciate any help!!

Thanks so much in advance,

Bettina

Re: Need a new password every 24 hours

Posted: Tue May 19, 2009 12:30 pm
by John Cartwright
bettina702 wrote:I do not need a MySql database, just the automated password generation and capability to e-mail it.
While you do not need one, I would highly recommend it. What have you tried so far?

How are you storing the passwords currently? You can setup a cron job to run every 24 hours to change/email the passwords, and can email the passwords using Swiftmailer.

There is alot of potential for security breach for anything with a packet sniffer and/or basic hacking skills. You need to make sure you are storing the passwords in a safe environment and encrypting the passwords before any transmission (i.e. email, database)

Re: Need a new password every 24 hours

Posted: Tue May 19, 2009 12:32 pm
by jaoudestudios
You could probably save yourself generating a new password so often by making your system more secure - I would start by...NOT emailing the password, unless you are using a secure socket.

Re: Need a new password every 24 hours

Posted: Tue May 19, 2009 12:54 pm
by kaisellgren
I would suggest you to use a database, they are handy and otherwise, you have more work to do with all that password handling and especially if you have several passwords.
jaoudestudios wrote:I would start by...NOT emailing the password, unless you are using a secure socket.
If the passwords are critical, they can be emailed only if the email itself is encrypted (which means you are going to use either GnuPG or PGP). It does not matter if the initial connection is encrypted since the emails probably go through several hops and will be exposed anyway

You said you are new to PHP? I would recommend you to show off your code once you are finished, because I am quite certain you will have some sort of vulnerabilities there. ;)

Re: Need a new password every 24 hours

Posted: Tue May 19, 2009 1:00 pm
by bettina702
Thanks so much for all the replies!

I haven't written any code yet, since I actually had no idea what it entails or where to begin.

I only need one password, and it does need to be emailed since those using the protected area are in multiple locations.

If it works best with a MySql DB behind it, then thats what I will do.