Bug 1952158

Summary: virt-install --install os=fedora33 --unattended profile=desktop,user-password-file will set empty password for the root account
Product: [Fedora] Fedora Reporter: Katerina Koukiou <kkoukiou>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: berrange, crobinso, philip.wyett
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 22:18:44 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 Katerina Koukiou 2021-04-21 16:04:21 UTC
Description of problem:

When performing unattended installation for fedora33 Workstation and passing only user-password-file and not the admin-password-file option the root account is usable and with an empty password.

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

Version     : 3.2.0
Release     : 2.fc33

How reproducible:
Always

Steps to Reproduce:
1. virt-install --connect qemu:///system --name test --os-variant fedora33 --memory 5120 --quiet --disk size=10,format=qcow2 --noautoconsole --wait -1 --install os=fedora33 --graphics spice,listen=127.0.0.1 --graphics vnc,listen=127.0.0.1 --unattended profile=desktop,user-password-file=/tmp/tmp.J0ljfGZ8bG,user-login=kkoukiou

2. The password file is just like this:

cat /tmp/tmp.J0ljfGZ8bG
PwcD3PjU8nRi5V7

Actual results:

Root account is not locked and has an empty password.

This is from inside the VM:

[kkoukiou@test ~]$ sudo cat /etc/shadow | grep root
[sudo] password for kkoukiou: 
root::18738:0:99999:7:::
[kkoukiou@test ~]$ sudo passwd -S root
root NP 2021-04-21 0 99999 7 -1 (Empty password.)

Expected results:

Root account will be locked.

If my expectation is wrong should we maybe clear this out in the man page?

Comment 1 Cole Robinson 2021-04-21 22:18:44 UTC

*** This bug has been marked as a duplicate of bug 1952157 ***