diff options
Diffstat (limited to 'testprogs/ejs')
-rwxr-xr-x | testprogs/ejs/ejsnet.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/testprogs/ejs/ejsnet.js b/testprogs/ejs/ejsnet.js index a4dd27dd45..537312766a 100755 --- a/testprogs/ejs/ejsnet.js +++ b/testprogs/ejs/ejsnet.js @@ -1,4 +1,17 @@ #!/usr/bin/env smbscript var ctx = NetContext("Administrator", "admin"); -ctx.CreateUser("noname"); +var usr_ctx = ctx.UserMgr("BUILTIN"); +if (usr_ctx == undefined) { + print("Couln't get user management context.\n"); + return -1; +} + +var status = usr_ctx.Create("noname"); +if (status.is_ok != true) { + print("Failed to create user account: " + status.errstr + "\n"); + return -1; +} + +print ("OK\n"); +return 0; |