summaryrefslogtreecommitdiff
path: root/source4/setup
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-10-17 11:33:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:44:52 -0500
commitbb3a915c9df2e7356f7ed171ac05c4ad08ec010a (patch)
tree295cfc8989b8ca03c9e2457526601832060ab1a6 /source4/setup
parent374ced5ab0b03bc84f5144822e28a1dab31ece4f (diff)
downloadsamba-bb3a915c9df2e7356f7ed171ac05c4ad08ec010a.tar.gz
samba-bb3a915c9df2e7356f7ed171ac05c4ad08ec010a.tar.bz2
samba-bb3a915c9df2e7356f7ed171ac05c4ad08ec010a.zip
r11113: fixed two small bugs in newuser
- randpass() is now in the random ejs module, not global - don't dereference the undefined variable on getopt failure (This used to be commit 7e338c23f5ac351b362a9e07fd81ec07bc700484)
Diffstat (limited to 'source4/setup')
-rwxr-xr-xsource4/setup/newuser3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/setup/newuser b/source4/setup/newuser
index cf2c7b8382..c114338d27 100755
--- a/source4/setup/newuser
+++ b/source4/setup/newuser
@@ -16,7 +16,7 @@ options = GetOptions(ARGV,
'quiet');
if (options == undefined) {
- println("Failed to parse options: " + options.ERROR);
+ println("Failed to parse options");
return -1;
}
@@ -56,6 +56,7 @@ if (options['username'] == undefined) {
ShowHelp();
}
if (options['password'] == undefined) {
+ random_init(local);
options.password = randpass(12);
printf("chose random password %s\n", options.password);
}