[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] qga: add guest-set-admin-password command

From: Roman Kagan
Subject: Re: [Qemu-devel] [PATCH v2] qga: add guest-set-admin-password command
Date: Wed, 4 Feb 2015 13:48:40 +0300
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Jan 12, 2015 at 03:58:14PM +0000, Daniel P. Berrange wrote:
> Add a new 'guest-set-admin-password' command for changing the
> root/administrator password. This command is needed to allow
> OpenStack to support its API for changing the admin password
> on a running guest.
> Accepts either the raw password string:
> $ virsh -c qemu:///system  qemu-agent-command f21x86_64 \
>    '{ "execute": "guest-set-admin-password", "arguments":
>      { "crypted": false, "password": "12345678" } }'
>   {"return":{}}
> Or a pre-encrypted string (recommended)
> $ virsh -c qemu:///system  qemu-agent-command f21x86_64 \
>    '{ "execute": "guest-set-admin-password", "arguments":
>      { "crypted": true, "password":
>         "$6$T9O/j/aGPrE...snip....rQoRN4F0.GG0MPjNUNyml." } }'

Does it have to be a QMP command?  Wouldn't the recently (re-)submitted
guest-exec allow to do the same, by running "chpasswd" in the guest and
piping the username:password into its stdin?

Besides I think it makes sense to (optionally) pass the username, to
allow to change the password for arbitrary users.  This would make the
functionality useful for systems where root password plays no role as
root logins are disallowed, and the only access to root shell is via
sudo from a user belonging to a particular group (IIRC Ubuntu is usually
set up like that).

> NB windows support is desirable, but not implemented in this
> patch.

Yes Windows may have an issue with username here too, because the admin
user can be any user (and even "Administrator" can be localized).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]