From: "Zeeshan Ali (Khattak)" <zeesha...@gnome.org>

Separate out root and user password setup in fedora installer so that
root account is not made passwordless just because user password was
not specified.
---
 data/install-scripts/fedora.xml | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/data/install-scripts/fedora.xml b/data/install-scripts/fedora.xml
index 5199b88..a62e2e4 100644
--- a/data/install-scripts/fedora.xml
+++ b/data/install-scripts/fedora.xml
@@ -213,11 +213,14 @@ spice-vdagent
 
 useradd -G wheel <xsl:value-of select="config/user-login"/> # Add user
 if test -z <xsl:value-of select="config/user-password"/>; then
-    # Make both user and root account passwordless
-    passwd -d <xsl:value-of select="config/user-login"/>
-    passwd -d root
+    passwd -d <xsl:value-of select="config/user-login"/> # Make user account 
passwordless
 else
     echo <xsl:value-of select="config/user-password"/> |passwd --stdin 
<xsl:value-of select="config/user-login"/>
+fi
+
+if test -z <xsl:value-of select="config/admin-password"/>; then
+    passwd -d root # Make root account passwordless
+else
     echo <xsl:value-of select="config/admin-password"/> |passwd --stdin root
 fi
 
-- 
1.8.0

_______________________________________________
virt-tools-list mailing list
virt-tools-list@redhat.com
https://www.redhat.com/mailman/listinfo/virt-tools-list

Reply via email to