[Adduser-devel] Bug#472349: adduser: please delay more than 5 seconds during deluser root

Justin Pryzby justinpryzby at users.sourceforge.net
Sun Mar 23 17:53:15 UTC 2008


Package: adduser
Version: 3.106
Tags: patch
File: /usr/sbin/deluser
See also: #471705

This patch explicit statement that there is a time limit; without
this, users are likely to reread the huge warning rather than quickly
aborting/suspending the process to investigate.

--- /usr/sbin/deluser
+++ /tmp/tmp.FqfaY26055/deluser	2008-03-23 13:50:46.000000000 -0400
@@ -225,11 +225,13 @@
     }
     
     # Warn in any case if you want to remove the root account 
-    if ($uid == 0) {
+    if ($pw_uid == 0) {
+        my $delay=10;
         printf (gtx("WARNING: You are just about to delete the root account (uid 0)\n"));
+        printf (gtx("This action will proceed in $delay seconds; "));
+        printf (gtx("Press Ctrl+C immediately to abort\n"));
         printf (gtx("Usually this is never required as it may render the whole system unusable\n"));
-        printf (gtx("Press immediately Ctrl+C if you want to abort\n"));
-        sleep 5;
+        sleep $delay;
         printf (gtx("Ok, you really want it, I'll delete that account\n"));
     }
 






More information about the Adduser-devel mailing list