r15518: the 'password' option in POPT_COMMON_CREDENTIALS was conflicting with
authorAndrew Tridgell <tridge@samba.org>
Tue, 9 May 2006 03:50:32 +0000 (03:50 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:05:45 +0000 (14:05 -0500)
the password option in newuser. Move the local options above the
global options to fix.
(This used to be commit 2adcd4ff4ec1ef867b91274d994c39e7c0fdaad2)

source4/setup/newuser

index 4d2acf537329103dada5e7cb6a1f68441f5d0dc8..7c80e9e8de0c97cc377e9185967d85bb2b39c927 100755 (executable)
@@ -8,12 +8,12 @@ exec smbscript "$0" ${1+"$@"}
 
 options = GetOptions(ARGV,
                "POPT_AUTOHELP",
-               "POPT_COMMON_SAMBA",
-               "POPT_COMMON_VERSION",
-               "POPT_COMMON_CREDENTIALS",
                'username=s',
                'unixname=s',
                'password=s',
+               "POPT_COMMON_SAMBA",
+               "POPT_COMMON_VERSION",
+               "POPT_COMMON_CREDENTIALS",
                'quiet');
 
 if (options == undefined) {
@@ -24,7 +24,6 @@ if (options == undefined) {
 libinclude("base.js");
 libinclude("provision.js");
 
-
 /*
   print a message if quiet is not set
 */
@@ -56,6 +55,7 @@ You must provide at least a username
 if (options['username'] == undefined) {
        ShowHelp();
 }
+
 if (options['password'] == undefined) {
        random_init(local);
        options.password = randpass(12);