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 1247822

Summary: Report an unclear error while set password for a non-exsitent user inside the guest
Product: Red Hat Enterprise Linux 7 Reporter: zhenfeng wang <zhwang>
Component: qemu-guest-agentAssignee: Ademar Reis <areis>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: 7.2CC: berrange, dyuan, fjin, knoel, marcandre.lureau, mzhan, wzhang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-30 11:11:05 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:

Description zhenfeng wang 2015-07-29 02:23:03 UTC
Description of problem:
Report an unclear error while set password for a non-exsitent user inside the guest

Version-Release number of selected component (if applicable):
kernel-3.10.0-300.el7.x86_64
libvirt-1.2.17-2.el7.x86_64
qemu-kvm-rhev-2.3.0-13.el7.x86_64

guest info
qemu-guest-agent-2.3.0-2.el7.x86_64.rpm

How reproducible:
100%

Steps to Reproduce:
1.Prepare a running guest with guest agent installed
2.Get selinux to permissive mode since bug 1243458 haven't fixed yet
#setenforce 0
# getenforce
Permissive

3.Set password for a non-exsitent user inside the guest, will get an unclear error,this info should be improved

# virsh set-user-password  virt-tests-vm1  --user user1 --password redhat 
error: internal error: unable to execute QEMU agent command 'guest-set-user-password': child process has failed to set user password


Actual results:
report an unclear error while set password for a non-exsitent user inside the guest

Expected results:
should get clear error info, such as "user user1 didn't exsit"

Additional info:

Comment 2 Marc-Andre Lureau 2015-07-30 10:38:15 UTC
this is really minor and perhaps wontfix: if it fails to set password it is very likely because the user didn't exist, so the generic error is enough.

Parsing chpasswd error output is cumbersome and could potentially break on various systems or updates.

Daniel, since you implemented it, I suppose you came to similar conclusion?

Comment 3 Daniel Berrangé 2015-07-30 10:53:54 UTC
Yeah, I don't think it is worth the complexity to try to parse chpassword output here, the generic error is sufficient IMHO.

Comment 4 Marc-Andre Lureau 2015-07-30 11:11:05 UTC
agree, let's close as wontfix then