From 5196640c2c81fed284d4fee8ce13ebf1da467cdd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 9 May 2006 03:50:32 +0000 Subject: r15518: the 'password' option in POPT_COMMON_CREDENTIALS was conflicting with the password option in newuser. Move the local options above the global options to fix. (This used to be commit 2adcd4ff4ec1ef867b91274d994c39e7c0fdaad2) --- source4/setup/newuser | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source4/setup/newuser b/source4/setup/newuser index 4d2acf5373..7c80e9e8de 100755 --- a/source4/setup/newuser +++ b/source4/setup/newuser @@ -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); -- cgit