[virt-tools-list] [libosinfo v5 11/12] Separate root & user passwd setup in fedora installer

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Wed Nov 14 02:40:50 UTC 2012


From: "Zeeshan Ali (Khattak)" <zeeshanak at 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




More information about the virt-tools-list mailing list