1SAMUSRGRP(8)                System Manager's Manual               SAMUSRGRP(8)
2
3
4

NAME

6       samusrgrp - add or remove users from groups in SAM database files
7

SYNOPSIS

9       samusrgrp [options] <samfile>
10

DESCRIPTION

12       This  manual page documents briefly the samusrgrp command.  This manual
13       page was written for the Debian distribution because the original  pro‐
14       gram does not have a manual page.
15
16       samusrgrp  is  a  non-interactive  command line utility that can add or
17       remove a user from a local group that exists in the SAM  user  database
18       of  a  Microsoft  Windows  system (Windows NT, 2000, XP, Vista, 7, 8.1,
19       etc.).  This file is usually located at \WINDOWS\system32\config\SAM on
20       the file system of a Microsoft Windows Operating System
21
22       On  success,  the  program  does not output any informatin and the exit
23       code is 0.
24
25       The binary program supports multiple  names.  If  it  is  called  named
26       samusrtogrp  it  will  assume -a mode (add user). If it is called named
27       samusrfromgrp it will assume -r mode (remove user).
28
29

OPTIONS

31       -h     Show summary of options.
32
33       -a     The user is added to the group.  This option has to be  followed
34              by -u and -g .
35
36       -r     The  user is removed from the group.  This option has to be fol‐
37              lowed by -u and -g .
38
39       -u <user>
40              User to change. The user value can be provided as a username, or
41              a  RID  number  in hexadecimal (if the username is preceded with
42              '0x'). Usernames including international characters will  proba‐
43              bly not work.
44
45       -g <group>
46              Group  to change. The group can only be given as a group number,
47              in hexadecimal, preceded with with '0x'.
48
49       -l     Lists the groups in the SAM database.
50
51       -L     Lists the groups in the SAM database as well as their members.
52
53       -s     Print the machine SID.
54
55       -H     Output human readable output. The program by default will  print
56              a parsable table unless this option is used.
57
58       -N     Do  not  allocate  more  information,  only allow the editing of
59              existing values with same size.
60
61       -E     Do not expand the hive file (safe mode).
62
63       -t     Print debug information of allocated blocks.
64
65       -v     Print verbose information and debug messages.
66
67

EXAMPLES

69       samusrgrp -a -u theboss -g 0x220 SAMFILE
70              Adds a user named 'theboss' to the group 0x220 (Administrators)
71
72
73       samusrgrp -a -u 0x3ea -g 0x221 SAMFILE
74              Adds a user with the id '0x3aa' to the group 0x221 (Users)
75
76
77       samusrgrp -r -u 0x3ff -g 0x221 SAMFILE
78              Remove a user with the id '0x3ff' from the group 0x221 (Users)
79
80

KNOWN BUGS

82       If the username includes international (non-ASCII) characters the  pro‐
83       gram will not (usually) find it. Use the RID number instead.
84
85

SEE ALSO

87       chntpwd, reged, sampasswd
88       You will find  more information available on how this program works, in
89       the      text      files      /usr/share/doc/chntpw/README.txt      and
90       /usr/share/doc/chntpw/MANUAL.txt
91
92       More   documentation  is  available  at  the  upstream's  author  site:
93       http://pogostick.net/~pnh/ntpasswd/
94
95

AUTHOR

97       This program was written by Petter N Hagen.
98
99       This   manual   page   was   written   by   Javier   Fernandez-Sanguino
100       <jfs@debian.org>,  for  the Debian GNU/Linux system (but may be used by
101       others).
102
103
104
105                                6th August 2014                   SAMUSRGRP(8)
Impressum