Hans van Kranenburg wrote:
> But... when i choose 'Enable root account' -> No, probably fill in
> a name for the normal user, but choose (go back) and then choose
> 'Enable root account' -> Yes, the questions to set the root password
> won't be asked. A normal user (e.g. 'piet' is created, root does not
> have a password and also sudo is not set up to give piet sudo rights.
> So after the installation i'm left with an unusable situation:

Thanks for a very clear problem report. 

The bug is here:

                db_get passwd/root-login
                if [ "$RET" = false ]; then
                        # root password will be locked
                        db_set passwd/root-password ""
                        db_set passwd/root-password-crypted "!"

First time through, these values are set. The second time through,
it thinks these have been preseeded, so doesn't ask for a root password.

Here's a patch, which I have not tested:

Index: debian/changelog
===================================================================
--- debian/changelog    (revision 42928)
+++ debian/changelog    (working copy)
@@ -1,3 +1,12 @@
+user-setup (1.8) UNRELEASED; urgency=low
+
+  * Fix backing up after having chosen to not enable root logins, and changing
+    it to enable root logins. Since the crypted password was set to a locked
+    passowrd in the first pass, the second pass failed to ask for a root
+    password. Closes: #400766
+
+ -- Joey Hess <[EMAIL PROTECTED]>  Tue, 28 Nov 2006 14:49:36 -0500
+
 user-setup (1.7) unstable; urgency=low
 
   [ Updated translations ]
Index: user-setup-ask
===================================================================
--- user-setup-ask      (revision 42928)
+++ user-setup-ask      (working copy)
@@ -46,10 +46,12 @@
                        db_set passwd/root-password-crypted "!"
                elif ! root_password; then
                        # First check whether the root password was preseeded 
crypted
+                       # to an actual password (not locked).
                        db_get passwd/root-password-crypted || true
-                       if ! test "$RET" ; then
+                       if ! test "$RET" || [ "$RET" = "!" ]; then
                                # No preseed of the root password hash
                                # we will prompt the user
+                               db_set passwd/root-password-crypted ""
                                db_input critical passwd/root-password || true
                                db_input critical passwd/root-password-again || 
true
                        fi

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to