mirror of
https://github.com/samba-team/samba.git
synced 2025-02-25 17:57:42 +03:00
r11587: Trivial testing code giving an idea of how could using
subcontexts look like. rafal (This used to be commit 5a338b04f37f6160f4aaf7d9758aa2d817516eb1)
This commit is contained in:
parent
2a006a7e6b
commit
6d3fac3fdc
@ -1,4 +1,17 @@
|
|||||||
#!/usr/bin/env smbscript
|
#!/usr/bin/env smbscript
|
||||||
|
|
||||||
var ctx = NetContext("Administrator", "admin");
|
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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user