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

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 mak

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

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 lallous
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. Elias, "Peter Janett" <[EMAIL PROTECTED]> wrote in message 026a01c26b94$7b45d0a0$55285742@peters">news:026a01c26b94

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? > > should be the answer to your questions. -- jakob -- PHP General Mailing List (ht

Re: [PHP] Unix passwd file

2002-10-04 Thread Peter Janett
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. The