Check Unix password in PHP
| From: | Simanhew | Date: | Tue, 20 Aug 2002 20:20:07 +0000 |
| Subject: | Check Unix password in PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-113382@lists.php.net to get a copy of this message | ||
Hi all,
I am trying to check password that user typed with the one in Unix system.
Some tutorial(or PHP Manual) just retrieves content in /etc/passwd and
compare it, but
password could be stored in shadow, not in passwd; someone suggested to
write a tiny C code,
chown it to root, change sticky bit and run it in PHP; someone used ypcat to
compare it......
Personally I prefer to write a tiny C code, I just wonder if it is safe?
Is there any "Standard & Safe" way to do this job ?
Thanks in advance,
Siman