Re: changing unix password in php?
| From: | Larry Brown | Date: | Thu, 24 Jan 2002 02:49:48 +0000 |
| Subject: | Re: changing unix password in php? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-81812@lists.php.net to get a copy of this message | ||
I've tried several versions of this:
$command = "su root";
$id = "whoami";
passthru($command, $result);
passthru($id, $result2);
echo $result;
echo $result2;
"Jon Farmer" <jonfarmer@enta.net> wrote in message
news:00de01c1a42c$9401d970$70604ac3@enta.net...
> > Along this line, I have attempted to run a command as root from the
server
> > by using su. It never changed user. I tried using passthru to see if I
> > could get the password prompt coming back with no luck. If I run
passthru
> > date, I get the time and date back. If I run passthru root, I get
nothing
> > back. I don't want to run apache as root and I would need to in order
to
> > access secured documents like passwd or some of the config files in etc.
> > Can someone help with this?
>
> Can you post code?
>
> --
> Jon Farmer
> Systems Programmer, Entanet www.enta.net
> Tel 01952 428969
> PGP Key available, send email with subject: Send PGP Key
>
>