[PHP] posix_getpwnam
Hi, I`m using function posix_getpwnam. Its works correctly. But The result for param passwd is only "x". I know why is it. Because i have save unix users passwords in shadow file,not in passwd file, there is only "x". Is there some function,which param is encrypted(MD5) password in PHP? I need: User puts password,and I will compare these password with password in shadow? Thank you very much Tomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] posix_getpwnam
Hello Tom, Monday, August 13, 2001, 10:23:16 AM, you wrote: TK Hi, TK I`m using function posix_getpwnam. Its works correctly. But The result for TK param passwd is only "x". I know why is it. Because i have save unix users TK passwords in shadow file,not in passwd file, there is only "x". TK Is there some function,which param is encrypted(MD5) password in PHP? TK I need: User puts password,and I will compare these password with password TK in shadow? TK Thank you very much TK Tomas You can use function md5() and than you can compare users password in passwd file with password submited to form. I hope it helps -- Best regards, Danielmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] posix_getpwnam()
Hi there. i have a script like this #!/usr/local/bin/php ? $username=blah; $password=nblah; $foo=posix_getpwnam($username); echo $foo[name]; echo $foo[passwd]; ? Problem when run SETUID if i run as root it's ok but if i run as diffrent user it's won't run ok i know it's a problem on the permission i set is to chmod 4750 in perl it should run as root...but in php not so how can i fix this when i run not as root it will just be fine and give me the result i want OS if i run on freebsd .no problem if i run on RedHat (shadow password) i can get any think how do posix deal with shadow password Yamin Prabudy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]