Goal: accepts the -O flag for backward compatibility. (was used by adduser?)

Note: useradd.8 needs to be regenerated.

Status wrt upstream: not included as this is just specific 
                     backward compatibility for Debian

--- a/man/useradd.8.xml
+++ b/man/useradd.8.xml
@@ -300,6 +300,11 @@
 	    <replaceable>UID_MIN</replaceable>=<replaceable>10</replaceable>,<replaceable>UID_MAX</replaceable>=<replaceable>499</replaceable>
 	    doesn't work yet.
 	  </para>
+          <para>
+            For the compatibility with previous Debian's
+            <command>useradd</command>, the <option>-O</option> option is
+            also supported.
+          </para>
 	</listitem>
       </varlistentry>
       <varlistentry>
--- a/src/useradd.c
+++ b/src/useradd.c
@@ -996,9 +996,9 @@
 		};
 		while ((c = getopt_long (argc, argv,
 #ifdef WITH_SELINUX
-		                         "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:UZ:",
+		                         "b:c:d:De:f:g:G:k:O:K:lmMNop:rs:u:UZ:",
 #else
-		                         "b:c:d:De:f:g:G:k:K:lmMNop:rs:u:U",
+		                         "b:c:d:De:f:g:G:k:O:K:lmMNop:rs:u:U",
 #endif
 		                         long_options, NULL)) != -1) {
 			switch (c) {
@@ -1120,6 +1120,7 @@
 				kflg = true;
 				break;
 			case 'K':
+			case 'O': /* compatibility with previous Debian useradd */
 				/*
 				 * override login.defs defaults (-K name=value)
 				 * example: -K UID_MIN=100 -K UID_MAX=499
