Re: using stdin in php
| From: | Jason Wong | Date: | Tue, 04 Jun 2002 18:42:47 +0000 |
| Subject: | Re: using stdin in php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-100615@lists.php.net to get a copy of this message | ||
On Thursday 30 May 2002 08:55, rdkurth@starband.net wrote:
> Could somebody look at this a tell me way it does not set the
> password correctly. I know it has to run at root this has been
> handled.
> I think my problem is with --stdin. It sets a password but it does not
> set it correctly
>
> $cmd = "echo $newpassword | passwd --stdin $user";
> return(exec($cmd));
$pw = 'fiddle';
$user = 'doo';
echo "$pw" | passwd --stdin $user;
works for me.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Never say you know a man until you have divided an inheritance with him.
*/