Execute (OS) commands that need rights
| From: | Ralph Beekman | Date: | Thu, 28 Feb 2002 12:13:18 +0000 |
| Subject: | Execute (OS) commands that need rights | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-919@lists.php.net to get a copy of this message | ||
I protected a web on a Cobalt RaQ4 using .htaccess. The command to add users
or change passwords is
>htpasswd [-b] <passwordfile .htaccess> <username> [<password>]
(-b is used if <password> is given in the command, otherwise password will
be prompted twice)
I want my webusers to be able to change their password themselves using a
page that passes un/pw to PHP.
The htpasswd command needs priveledges. So this doesn't work now (using
passthru() or exec()).
How can I safely see to it that the priviledges needed for this command are
set in the PHP code?
Note. I am a novice at PHP
--
Mvg,
Ralph Beekman