the password option in newuser. Move the local options above the
global options to fix.
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) {
libinclude("base.js");
libinclude("provision.js");
-
/*
print a message if quiet is not set
*/
if (options['username'] == undefined) {
ShowHelp();
}
+
if (options['password'] == undefined) {
random_init(local);
options.password = randpass(12);