[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



From: "Zeeshan Ali (Khattak)" <zeeshanak 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 a16a0dc..892526a 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]