Phoenix.pm: Expect.pm question

Kevin Buettner kev at primenet.com
Mon Nov 8 13:24:20 CST 1999


On Nov 8, 11:54am, Douglas E. Miles wrote:

> I have a little more information on the problem.  I was originally
> running this as 'user2' (test user), and the script was owned by
> 'user2'.  It appears to work right up until the actual change is to take
> effect.  I tried changing the ownership to root and running it as root,
> and BINGO!, it changes the root password.  Unfortunately this isn't what
> I want.  Any ideas are appreciated.  I'm still hacking away...

Try

    my $passwd = Expect->spawn("/usr/bin/passwd $username");

instead.  (Set $username as appropriate.)

Kevin

-- 
Kevin Buettner
kev at primenet.com, kevinb at cygnus.com



More information about the Phoenix-pm mailing list