Hi Michael

> > I don't think I'm making myself clear.  I want some kind of
> > authentication system that lets a user log in through a PHP page if
> > their username and password identifies them as a user on the Linux
> > system.

> > Can you have php read a file of usernames and passwords?

> I could, but the problem is that the passwords are encrypted
> - not even I (as the root user) can make sense of them.

Usually they are not encrypted (meaning someone decrypting the phrase can
know the originally entered password) but hashed (encrypted irreversibly).
This is how 99% of programmers store passwords.
In order to be able to do anything you will have to know which way of
hashing the password has been used, say MD5.

Now to know if a user can login: ask user for username and password, hash
the password he has just entered andcompare the username and the hash you
calculated with what is stored. You will not need to read the password.
This is also basically how for instance the PIN of bank cards is verified.
Storing customers PIN numbers in a database would be an invitation for
hackers (and dishonest people working at the bank).

Marc



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/2jUsvC/tzNLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to