samusrgrp -V (return code: 1)
samusrgrp: invalid option -- '-'
samusrgrp version 0.2 140201, (c) Petter N Hagen
samusrgrp [-a|-r] -u <user> -g <groupid> <samhive>
Add or remove a (local) user to/from a group
Mode: -a = add user to group
-r = remove user from group
-l = list groups
-L = list groups and also their members
-s = Print machine SID
Parameters:
<user> can be given as a username or a RID in hex with 0x in front
<group> is the group number, in hex with 0x in front
Example:
-a -u theboss -g 0x220 -> add user named 'theboss' group hex 220 (administrators)
-a -u 0x3ea -g 0x221 -> add user with RID (hex) 3ea group hex 221 (users)
-r -u 0x3ff -g 0x220 -> remove user RID 0x3ff from grp 0x220
Usernames with international characters usually fails to be found,
please use RID number instead
If success, there will be no output, and exit code is 0
Also, success if user already in (or not in if -r) the group
Options:
-H : Human readable output, else parsable
-N : No allocate mode, only allow edit of existing values with same size
-E : No expand mode, do not expand hive file (safe mode)
-t : Debug trace of allocated blocks
-v : Some more verbose messages/debug
Multi call binary, if program is named:
samusrtogrp -- Assume -a mode: Add a user into a group
samusrfromgrp -- Assume -r mode: Remove user from a group
samusrgrp -h (return code: 0)
samusrgrp version 0.2 140201, (c) Petter N Hagen
samusrgrp [-a|-r] -u <user> -g <groupid> <samhive>
Add or remove a (local) user to/from a group
Mode: -a = add user to group
-r = remove user from group
-l = list groups
-L = list groups and also their members
-s = Print machine SID
Parameters:
<user> can be given as a username or a RID in hex with 0x in front
<group> is the group number, in hex with 0x in front
Example:
-a -u theboss -g 0x220 -> add user named 'theboss' group hex 220 (administrators)
-a -u 0x3ea -g 0x221 -> add user with RID (hex) 3ea group hex 221 (users)
-r -u 0x3ff -g 0x220 -> remove user RID 0x3ff from grp 0x220
Usernames with international characters usually fails to be found,
please use RID number instead
If success, there will be no output, and exit code is 0
Also, success if user already in (or not in if -r) the group
Options:
-H : Human readable output, else parsable
-N : No allocate mode, only allow edit of existing values with same size
-E : No expand mode, do not expand hive file (safe mode)
-t : Debug trace of allocated blocks
-v : Some more verbose messages/debug
Multi call binary, if program is named:
samusrtogrp -- Assume -a mode: Add a user into a group
samusrfromgrp -- Assume -r mode: Remove user from a group