Bug 1146275

Summary: regression setting root password with virt-builder/virt-customize
Product: [Fedora] Fedora Reporter: Cole Robinson <crobinso>
Component: libguestfsAssignee: Pino Toscano <ptoscano>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: mbooth, ptoscano, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1147065 (view as bug list) Environment:
Last Closed: 2014-09-29 12:38:36 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: 1147065    
Attachments:
Description Flags
Output from: sudo virt-customize -v -x --password root:password:1234AA -a fedora-20.img none

Description Cole Robinson 2014-09-24 22:21:22 UTC
Setting the root password with virt-customize and virt-builder doesn't seem to work with libguestfs-1.27.50. Tested against a virt-builder fedora-20 image.

It worked last week, so I downgraded arbitrarily to libguestfs-1.27.36, tried setting a password, and it worked. yum updated to latest, tried setting a password, and it failed, and the old password didn't work either.

Comment 1 Cole Robinson 2014-09-24 22:25:22 UTC
Created attachment 940938 [details]
Output from: sudo virt-customize -v -x --password root:password:1234AA -a fedora-20.img

Comment 2 Richard W.M. Jones 2014-09-26 18:38:25 UTC
Something to do with now using Augeas to edit the /etc/shadow file?

Comment 3 Pino Toscano 2014-09-29 11:58:54 UTC
(In reply to Richard W.M. Jones from comment #2)
> Something to do with now using Augeas to edit the /etc/shadow file?

Indeed, the way Augeas writes the new file loses the SELinux context. Luckly we have the API for copying attributes.

Patches posted:
  https://www.redhat.com/archives/libguestfs/2014-September/msg00281.html
  https://www.redhat.com/archives/libguestfs/2014-September/msg00282.html