[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Reading /etc/shadow from PHP



"Adam Knowles" <adam@xxxxxxxxxxxxxxx> wrote:
> I know this info is stored in /etc/shadow but I also know that file is
> only readable by 'root'. PHP runs as 'nobody' so it couldn't access the
> passwords directly to compare them with what the user enters..

Adam, you could write a shell script called by cron every x minutes to copy
passwd and shadow to a location you can access (with the correct permissions
of course).  This really is a purely PHP question, though.  You could also
implement HTTP authentication.  See the following URL, search the
php-general archives or post to php-general.

http://www.php.net/manual/en/features.http-auth.php
http://marc.theaimsgroup.com/
http://www.php.net/

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/