[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Reading /etc/shadow from PHP
- Subject: Re: [cobalt-users] Reading /etc/shadow from PHP
- From: "Steve Werby" <steve-lists@xxxxxxxxxxxx>
- Date: Wed Apr 24 09:18:49 2002
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
"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/