Re: Authentication using /etc/passwd?
| From: | Stephen Hui | Date: | Wed, 26 Jul 2000 14:18:40 +0000 |
| Subject: | Re: Authentication using /etc/passwd? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-8306@lists.php.net to get a copy of this message | ||
I don't know if there is a way to do it stricly in PHP, but I have done
it (or I should say, I have reused someone else's code that does it) in
a PHP/perl combination.
Basically, perl5 has a couple of standard library subroutine calls that
will do the job. The perl script takes, as arguments, a username and
password (both plain text), calls the appropriate perl subroutines, and
returns an integer as a return code. PHP calls the perl script via
exec(), captures the return code and handles it appropriately.
E-mail me if you're still intereted and I'll give you more details.
Stephen.
Jeroen Geusebroek wrote:
>
> Hi there,
>
> I want to secure a part of my site with PHP; However i want the
> login/password
> the same as they use to access the normal system (Mail, shell etc.) What's
> the
> best way do do this? Is it possible using /etc/passwd? Should i authenticate
> using IMAP or something?
>
> Thanks,
>
> Jeroen Geusebroek
--
Stephen Hui, ARL:UT, Austin, Texas
Computer Terms: Programmer - A red-eyed, mumbling mammal
capable of conversing with inanimate objects.