Re: Unix passwd file
| From: | Scott St. John | Date: | Fri, 04 Oct 2002 12:33:48 +0000 |
| Subject: | Re: Unix passwd file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-118872@lists.php.net to get a copy of this message | ||
At 04:54 AM 10/4/2002 -0600, Peter Janett wrote:
>You can just put the username and password in the MySQL database as normal
>text, then build your applications that are reading them to check the
>passwords with the UNIX Crypt function.
Basically that is what I am trying to do. I just converted a BSDI passwd
file to Linux
to move the users to a new server. Now I want to move the user accounts to
a MySQL
table that Postfix, Radius and Apache/PHP can share to authenticate the users.
>In other words, just as your passwords are stored in a plain text file,
>store them in plain text in the db. Then to confirm them, take the first 2
>characters of the crypted password, use them as the salt to crypt the
>password the user entered, and compare the results. If that are the same,
>they entered a valid password.
So this would validate the user? What about if the user wants to change
their password?
In PHP can I crypt backwards and still be compatible with the Linux passwd
file? I am
trying to avoid manually typing in over 5,000 usernames and passwords.
-Scott