Re: Interactive Commands
| From: | Joe Conway | Date: | Mon, 23 Oct 2000 12:51:27 +0000 |
| Subject: | Re: Interactive Commands | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-21777@lists.php.net to get a copy of this message | ||
>Subject: [PHP] Interactive Commands
> I was recently doing useless stuff with System(),
> Exec(), Passthru, etc... and was wondering if i could
> change my password using this :
>
<snip>
> this works fine, but i can't seem to get this right :
> echo "<pre>";
> passthru("passwd\noldpass\nnewpass\nnewspass");
> echo "</pre>";
Try running:
<html><body>
<?
$output =
whoami;
echo "<pre>$output</pre>";
?>
</body></html>
Note the backticks around whoami. This will show you the user that your
web server is running as. That user won't be able to change your password.
Hope this helps,
Joe