r9319: updated newuser script for new OO style for nss object
authorAndrew Tridgell <tridge@samba.org>
Tue, 16 Aug 2005 10:52:02 +0000 (10:52 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:33:24 +0000 (13:33 -0500)
thanks to Hotarut for spotting this

source/setup/newuser

index 4471e70919a84c14785acdf9265aa70e3b513b2e..f5015611b960e39b2e65eb79ccb42900ad8a950a 100755 (executable)
@@ -63,7 +63,8 @@ if (options['unixname'] == undefined) {
        options.unixname = options.username;
 }
 
-if (getpwnam(options.unixname) == undefined) {
+var nss = nss_init();
+if (nss.getpwnam(options.unixname) == undefined) {
        printf("ERROR: Unix user '%s' does not exist\n", options.unixname);
        exit(1);
 }