debian/patches/91_sulogin_lockedpw.dpatch (Thom May):
Purpose: Make sure file systems can be fixed on machines with locked
         root accounts too, by presenting a shell in these cases.
Authour: Thom May and Ubuntu.
Fixes:   #326678
Status:  unknown

--- trunk.orig/src/sulogin.c	2009-09-30 10:59:13.000000000 +0200
+++ trunk/src/sulogin.c	2009-09-30 10:59:13.000000000 +0200
@@ -241,7 +241,11 @@
 		fprintf(stderr, "%s: no entry for root\n", F_SHADOW);
 		strcpy(pwd.pw_passwd, "");
 	}
-	if (!valid(pwd.pw_passwd)) {
+
+	/* disabled passwords are valid too */
+	if (!(strcmp(pwd.pw_passwd, "*") == 0) ||
+	    !(strcmp(pwd.pw_passwd, "!") == 0) ||
+	    !valid(pwd.pw_passwd)) {
 		fprintf(stderr, "%s: root password garbled\n", F_SHADOW);
 		strcpy(pwd.pw_passwd, ""); }
 	return &pwd;
@@ -469,6 +473,14 @@
 		fprintf(stderr, "sulogin: cannot open password database!\n");
 		sleep(2);
 	}
+	/*
+	 *	If the root password is locked, fire up a shell
+	 */
+	if ((strcmp(pwd->pw_passwd, "*") == 0) ||
+	    (strcmp(pwd->pw_passwd, "!") == 0)) {
+		/* fprintf(stderr, "sulogin: root account is locked, starting shell\n"); */
+		sushell(pwd);
+	}
 
 	/*
 	 *	Ask for the password.
--- trunk.orig/man/sulogin.8	2009-07-24 11:49:26.000000000 +0200
+++ trunk/man/sulogin.8	2009-09-30 10:59:49.000000000 +0200
@@ -22,6 +22,10 @@
 .br
 (or type Control\-D for normal startup):
 .PP
+If the root account is locked, as is the default on Ubuntu, no password
+prompt is displayed and \fIsulogin\fR behaves as if the correct password
+were entered.
+.PP
 \fIsulogin\fP will be connected to the current terminal, or to the
 optional device that can be specified on the command line
 (typically \fB/dev/console\fP).
