Web Hosting Talk







View Full Version : php password check/login script


mattschinkel
09-01-2002, 01:33 PM
Hi, I am currently using Ensim Webppliance, and would like to create a members only area. I have no problem with making the members only area, but I would like each users password to be the same as their webppliance password. Any Idea's?

:: paVel ::
09-01-2002, 08:24 PM
I think that u have to change each password manually....
Thats my thinking...

MarlboroMan
09-01-2002, 11:44 PM
Depends on how Ensim stores passwords. If it stores them in a hashed password file that's readable by the Apache user, you can just open the file, and read it line by line until you match it against the username to find the hashed password, and then hash the password they entered and check it against the entry in the file.

Sorry if I'm entirely wrong, but I'm entirely UNfamiliar with Ensim.

boostar
09-03-2002, 03:21 AM
Change the

SELECT * FROM user WHERE user = $user AND pass = $pass

Studio64
09-03-2002, 04:32 AM
Originally posted by boostar
Change the

SELECT * FROM user WHERE user = $user AND pass = $pass

Nice guess....

But, more than likely if Ensim stores passwords in a db (which I have no clue whether or not they do) it'd be.


$pass = md5($pass);
SELECT * FROM user WHERE user = $user AND pass = $pass

Rich2k
09-03-2002, 06:28 AM
you could go for the slightly simpler method and put it all in SQL

SELECT * FROM user WHERE user = $user AND pass = MD5($pass)

mattschinkel
09-03-2002, 02:11 PM
It looks like the passwords are stored in the passwd and shadow files for webppliance. Are there any scripts that can check that a password is valid in the passwd file? or is there any way of decoding the passwords?

Acronym BOY
09-03-2002, 02:48 PM
Nevermind

Studio64
09-03-2002, 03:09 PM
Originally posted by Acronym BOY
Nevermind

Considering your name, wouldn't "n/m" be more correct?

boostar
09-03-2002, 03:35 PM
lol :)

Who knowes how the securety is on that system?

Not many systems uses md5 crypt passwords, then that wont work! If they do, thats the only way....

:: paVel ::
09-04-2002, 05:41 AM
;)