--- Daniel Ames <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> This was brought up before, but the archives didn't really answer my
> question.
>
> I'm trying to get my script to reset a password for me via the passwd
> command. Keep in mind, I'm very new, so if this is dumb, try not to
> laugh:
>
> #!/usr/bin/perl
>
> open(handle, "| passwd joeuser");
>
> print handle "password\n";
> print handle "password\n";
> close(handle);
>
> Here's what it spits out:
>
> Changing password for user joeuser
> New UNIX password: Retype new UNIX password:
> New UNIX password:
> New UNIX password:
> passwd: Conversation error
>
> Then it dies. I know I'm doing this wrong. Any ideas?
>
> Thanks!
WARNING: *STRICTLY* SPECULATION! =o)
<guess>
maybe passwd is actually reading directly from the terminal, rather
than just from stdin? You might end up having to fork a process and
write to `tty`. Hope not, but it's possible.
</guess>
List?
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/