[PHP] Unix passwd file

2002-10-04 Thread Scott
I apologize if this is might be OT. I have 5,000+ users in a unix passwd 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

Re: [PHP] Unix passwd file

2002-10-04 Thread Peter Janett
/1.3.22), MySQL 3.23.43 PostgreSQL coming soon! http://www.newmediaone.net [EMAIL PROTECTED] (303)828-9882 - Original Message - From: Scott [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 04, 2002 4:43 AM Subject: [PHP] Unix passwd file I

Re: [PHP] Unix passwd file

2002-10-04 Thread Jakob Breivik Grimstveit
Scott wrote: [...] does anyone know if I populate a MySQL table with the login/password can php then use that encrypted password to validate users? http://www.php.net/manual/en/function.crypt.php should be the answer to your questions. -- jakob -- PHP General Mailing List

Re: [PHP] Unix passwd file

2002-10-04 Thread lallous
tober 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 passwd 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

Re: [PHP] Unix passwd file

2002-10-04 Thread Josep R. Raurell
I found this code in a web (or somthink like this), but can remever where to give the credits, sorry. include_once('/etc/php/bases.php'); function autentifica($user,$pass) { global $db1Host, $db1User, $db1Pass; $auth = false; mysql_connect($db1Host,$db1User,$db1Pass) or die

Re: [PHP] Unix passwd file

2002-10-04 Thread Scott St. John
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

Re: [PHP] Unix passwd file

2002-10-04 Thread Scott St. John
At 01:54 PM 10/4/2002 +0200, lallous wrote: 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. I can parse the file just fine, what I am trying to do is actually make

Re: [PHP] Unix passwd file

2002-10-04 Thread Erwin
Username is no problem, the Unix encrypted password is the one I am trying to work out. If the user has a password of: phprocks and in /etc/passwd that encrypted password works out to be: !#@KJCKMSD, then I validate the user, they enter the correct username and password, will PHP be able