Bug#501849: Please permit installation with an empty user password
Otavio Salvador wrote:
> Except by a newline before the new comments your patch looks right.
Thanks for the review. I've attached an updated patch, also against
r56349 that includes the newline.
--
Emmet HIKORY
Index: debian/user-setup-udeb.templates
===================================================================
--- debian/user-setup-udeb.templates (revision 56349)
+++ debian/user-setup-udeb.templates (working copy)
@@ -22,6 +22,12 @@
Default: audio cdrom dialout floppy video plugdev netdev powerdev
Description: for internal use only
+# Allow preseeding whether to permit a blank password for created non-root user
+Template: passwd/allow-password-empty
+Type: boolean
+Default: false
+Description: for internal use only
+
Template: passwd/root-login
Type: boolean
Default: true
Index: user-setup-ask
===================================================================
--- user-setup-ask (revision 56349)
+++ user-setup-ask (working copy)
@@ -169,7 +169,7 @@
db_get passwd/user-password-crypted || true
if ! test "$RET" ; then
# Compare the two passwords, loop with message if not
- # identical, or if empty.
+ # identical
db_get passwd/user-password
USER_PW="$RET"
db_get passwd/user-password-again
@@ -183,7 +183,11 @@
STATE=6
continue
fi
- if [ -z "$USER_PW" ]; then
+
+ # Loop if the password is empty, and it's not
+ # specifically allowed by preseeding
+ db_get passwd/allow-password-empty
+ if [ "$RET" = false ] && [ -z "$USER_PW" ]; then
db_set passwd/user-password ""
db_set passwd/user-password-again ""
db_fset user-setup/password-empty seen false
Reply to: