Peter, I think he's stuck with the parsing part?
you can file() the /etc/passwd file then explode() it and add the
username,passhash parts and/or more values into the mysql table.
"Peter Janett" <[EMAIL PROTECTED]> wrote in message
> 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.
> 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
> 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.
> I guess I'm assuming your existing passwords are in crypt format, but the
> same process is probably possible with whatever format they are in.
> Peter Janett
> New Media One Web Services
> New Upgrades Are Now Live!!!
> Windows 2000 accounts - Cold Fusion 5.0 and Imail 7.1
> Sun Solaris (UNIX) accounts - PHP 4.1.2, mod_perl/1.25,
> Stronghold/3.0 (Apache/1.3.22), MySQL 3.23.43
> PostgreSQL coming soon!
> [EMAIL PROTECTED]
> ----- Original Message -----
> From: "Scott" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, October 04, 2002 4:43 AM
> Subject: [PHP] Unix passwd file
> > I apologize if this is might be OT. I have 5,000+ users in a unix
> > file that I would like to move to a MySQL table to build a login system
> > with php. I could then use this table for Postfix and Radius. I know
> > about the getpwent in perl, but does anyone know if I populate a MySQL
> > table with the login/password can php then use that encrypted password
> > validate users?
> > TIA
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php