[PATCH] debian: Configure PAM to allow empty passwords

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

 



If this is not configured, GDM will refuse logging in the user on Debian
Jessie.

This patch was verified to work using GNOME Boxes on a Debian 8.2.0 ISO.
---
 .../install-script/debian.org/debian-preseed-desktop.xml.in | 13 +++++++++++--
 data/install-script/debian.org/debian-preseed-jeos.xml.in   |  2 +-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/data/install-script/debian.org/debian-preseed-desktop.xml.in b/data/install-script/debian.org/debian-preseed-desktop.xml.in
index d9ac99d..e384fae 100644
--- a/data/install-script/debian.org/debian-preseed-desktop.xml.in
+++ b/data/install-script/debian.org/debian-preseed-desktop.xml.in
@@ -188,14 +188,23 @@ d-i finish-install/reboot_in_progress note
 <xsl:choose>
   <xsl:when test="config/admin-password = ''">
 # Delete root password
-d-i preseed/late_command string in-target passwd -d root
+d-i preseed/late_command string in-target passwd -d root; in-target sed -i 's/nullok_secure/nullok/' /etc/pam.d/common-auth
   </xsl:when>
 </xsl:choose>
 
 <xsl:choose>
   <xsl:when test="config/user-password = ''">
 # Delete user password
-d-i preseed/late_command string in-target passwd -d <xsl:value-of select="config/user-login"/>
+d-i preseed/late_command string in-target passwd -d <xsl:value-of select="config/user-login"/>; in-target sed -i 's/nullok_secure/nullok/' /etc/pam.d/common-auth
+
+# When we set the late_command the previous one gets overwritten, so if user
+# and admin password is empty we need to specify that explicitly
+    <xsl:choose>
+      <xsl:when test="config/admin-password = ''">
+# Delete root password
+d-i preseed/late_command string in-target passwd -d <xsl:value-of select="config/user-login"/>; in-target passwd -d root &amp;&amp; in-target sed -i 's/nullok_secure/nullok/' /etc/pam.d/common-auth
+      </xsl:when>
+    </xsl:choose>
   </xsl:when>
 </xsl:choose>
 
diff --git a/data/install-script/debian.org/debian-preseed-jeos.xml.in b/data/install-script/debian.org/debian-preseed-jeos.xml.in
index 13af8c1..0f0d329 100644
--- a/data/install-script/debian.org/debian-preseed-jeos.xml.in
+++ b/data/install-script/debian.org/debian-preseed-jeos.xml.in
@@ -116,7 +116,7 @@ d-i finish-install/reboot_in_progress note
 <xsl:choose>
   <xsl:when test="config/admin-password = ''">
 # Delete password
-d-i preseed/late_command string in-target passwd -d root
+d-i preseed/late_command string in-target passwd -d root; in-target sed -i 's/nullok_secure/nullok/' /etc/pam.d/common-auth
   </xsl:when>
 </xsl:choose>
 
-- 
2.6.2

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux