Re: [PHP3] does PAM lib PHP3 interface exist ?

From: Date: Fri, 14 Jan 2000 15:22:43 +0000
Subject: Re: [PHP3] does PAM lib PHP3 interface exist ?
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-14624@lists.php.net to get a copy of this message
Jan Vicherek wrote: > I'm looking for php3 equivalent of perl's Authen::PAM module. None exists that I know of. It would be possible to do I'm sure, if someone had the initiative :) > Which brings out another question: Is there a way with php to gain root > privileges (so that the passwords can be changed). PHP equivalent of > suidperl ? Yes, but you don't want to do that. Letting something accessiblve from the webserver do anything as root is bad. What I do, and *strongly* recommend, for users to change passwords is to use an expect script. The users logs into a secure server via standard .htaccess and enters their username, old password, new password, and confirms the new password. PHP does a bit of checking to make sure new passwords match, and that they are not trying to change the root password or something like that. Then these are passed to an expect script which su's to their user (NOT TO ROOT) and attempts to change the password. The only danger is that if someone were to get the htaccess password, they could hack away at a user password, but I'm thinking about logging attempts and giving like 3 tries a day just in case.

« previous php.dev (#14624) next »