blob: 537312766a7dd8e0459d0507190e995f9f41b6f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#!/usr/bin/env smbscript
var ctx = NetContext("Administrator", "admin");
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;
|