Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1369699

Summary: [qemu-geust-agent] cmd: guest-set-user-password: child process has failed to set user password
Product: Red Hat Enterprise Linux 6 Reporter: Zhengtong <zhengtli>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8CC: ailan, chayang, dwalsh, juzhang, lvrabec, mgrepl, mkenneth, mmalik, plautrba, pvrabec, rbalakri, ssekidde, virt-maint, xuwei, zhengtli
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.7.19-303.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1490206 (view as bug list) Environment:
Last Closed: 2017-03-21 09:47:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1490206    

Description Zhengtong 2016-08-24 07:42:00 UTC
Description of problem:
qga command "guest-set-user-password" can't get exepected result.  Instead, it gives a error msg:
"child process has failed to set user password"

Version-Release number of selected component (if applicable):

qemu-guest-agent-0.12.1.2-2.488.el6.x86_64 

How reproducible:
2/2

Steps to Reproduce:
1.start up guest 
/usr/libexec/qemu-kvm \
...
    -device virtio-serial-pci,id=virtio_serial_pci0,bus=pci.0,addr=03,disable-legacy=off,disable-modern=on \
    -chardev socket,path=virtio_port-org.qemu.guest_agent.0,nowait,id=id8bMDQm,server \
    -device virtserialport,bus=virtio_serial_pci0.0,name=org.qemu.guest_agent.0,chardev=id8bMDQm,id=idJV2WfH \
...

2.Send guest-set-user-password the qga
{"execute": "guest-set-user-password", "arguments": {"crypted": false, "username": "root", "password": "a3ZtYXV0b3Rlc3Q="}} 

3.Check the return value of command

Actual results:
{"execute": "guest-set-user-password", "arguments": {"crypted": false, "username": "root", "password": "a3ZtYXV0b3Rlc3Q="}}
{"error": {"class": "GenericError", "desc": "child process has failed to set user password", "data": {"message": "child process has failed to set user password"}}} 

Expected results:
It returns good ,and the password can be set

Additional info:

Guest boot cmd:
/usr/libexec/qemu-kvm \
    -machine pc  \
    -nodefaults  \
    -vga cirrus  \
    -device virtio-serial-pci,id=virtio_serial_pci0,bus=pci.0,addr=03,disable-legacy=off,disable-modern=on \
    -chardev socket,path=virtio_port-org.qemu.guest_agent.0,nowait,id=id8bMDQm,server \
    -device virtserialport,bus=virtio_serial_pci0.0,name=org.qemu.guest_agent.0,chardev=id8bMDQm,id=idJV2WfH \
    -device ich9-usb-ehci1,id=usb1,addr=1d.7,multifunction=on,bus=pci.0 \
    -device ich9-usb-uhci1,id=usb1.0,multifunction=on,masterbus=usb1.0,addr=1d.0,firstport=0,bus=pci.0 \
    -device ich9-usb-uhci2,id=usb1.1,multifunction=on,masterbus=usb1.0,addr=1d.2,firstport=2,bus=pci.0 \
    -device ich9-usb-uhci3,id=usb1.2,multifunction=on,masterbus=usb1.0,addr=1d.4,firstport=4,bus=pci.0 \
    -drive id=drive_image1,if=none,snapshot=on,aio=threads,cache=none,format=qcow2,file=/usr/share/avocado/data/avocado-vt/images/RHEL-Server-6.8-64-virtio.qcow2 \
    -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,bus=pci.0,addr=04,disable-legacy=off,disable-modern=on \
    -device virtio-net-pci,mac=9a:dd:de:df:e0:e1,id=idEm3Sb0,vectors=4,netdev=idHCUDn2,bus=pci.0,addr=05,disable-legacy=off,disable-modern=on \
    -netdev tap,id=idHCUDn2,vhost=on \
    -m 2048  \
    -smp 4,maxcpus=4,cores=2,threads=1,sockets=2  \
    -cpu 'SandyBridge',+kvm_pv_unhalt \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -vnc :0  \
    -rtc base=utc,clock=host,driftfix=slew  \
    -boot order=cdn,once=c,menu=off,strict=off \
    -enable-kvm

Comment 3 Gal Hammer 2016-09-20 12:06:35 UTC
Which OS is installed in the guest?

Comment 4 Zhengtong 2016-09-21 02:05:19 UTC
I am not sure what do you mean about "which OS". 
I guess I should say "RHEL-6.8-20160414.0"

ps:  bug1369693 has been verified, the issue is the same with that, only RHEL version is different.

Comment 5 Gal Hammer 2016-09-21 07:17:04 UTC
(In reply to Zhengtong from comment #4)
> I am not sure what do you mean about "which OS". 
> I guess I should say "RHEL-6.8-20160414.0"
> 
> ps:  bug1369693 has been verified, the issue is the same with that, only
> RHEL version is different.

Can you please check if this bug is also caused by selinux and if it does it should be assigned to the selinux group. Thanks.

Comment 6 Zhengtong 2016-09-21 09:09:12 UTC
seems caused by selinux policy.


In guest: 
[root@localhost Desktop]# getenforce
Enforcing

{"execute": "guest-set-user-password", "arguments": {"crypted": false, "username": "root", "password": "a3ZtYXV0b3Rlc3Q="}} 
{"error": {"class": "GenericError", "desc": "child process has failed to set user password", "data": {"message": "child process has failed to set user password"}}}

Set SELINUX off In guest:
[root@localhost Desktop]# setenforce 0
{"execute": "guest-set-user-password", "arguments": {"crypted": false, "username": "root", "password": "a3ZtYXV0b3Rlc3Q="}} 
{"return": {}}

Comment 7 Gal Hammer 2016-09-21 10:24:37 UTC
Hi Lukas. It seems that you fix for bug 1369693 need to be done in rhel6 as well. Thanks.

Comment 13 errata-xmlrpc 2017-03-21 09:47:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2017-0627.html