[xen-tools-discuss] Re: --role=passwd --role-args=password not working.

Steve Kemp steve at steve.org.uk
Tue Jun 3 16:32:03 CEST 2008


On Mon Jun 02, 2008 at 18:07:26 +0200, W3SERVE John wrote:

>         File: /etc/xen-tools/role.d/passwd
>         Args:  password
> 
> Changing password for user root.
> New UNIX password: Failed 1st prompt
> Changing password for user root.
> New UNIX password: Failed 1st prompt
> Changing password for user root.
> New UNIX password: Failed 1st prompt

> I hope somebody knows how to fix this problem.

  Take a look at the passwd role file and you'll see this:

    # prompt
    unless ($exp->expect(5,"Enter new"))
    {
        print "Failed 1st prompt\n";
        $exp->hard_close();
        return;
    }

  What this is doing is saying wait for the text string "Enter new",
 which is what the passwd command is supposed to output.

  From your  diagnostics we can see that when expect invokes passwd
 within the chroot() the prompt is "New UNIX password:" - so we
 get the error message.

  Update the role script to say "->exepct(5,"Enter" ))" and it'll
 probably work OK.  You might need to update the second step too
 where the script waits for the reponse "Retype new".

  Hope that helps ..

Steve
-- 
Debian GNU/Linux System Administration
http://www.debian-administration.org/






More information about the xen-tools-discuss mailing list