SAMUSRGRP(8)
β¨ SAMUSRGRP β¨
okay bestie, sit down, hydrate, and let me tell you about samusrgrp β it lives in section 8 of the System Manager's Manual and it's here to add or remove users from groups in SAM database files. π
πΈ NAME πΈ
samusrgrp β add or remove users from groups in SAM database files π«Ά
π SYNOPSIS π
samusrgrp [options] <samfile>
π DESCRIPTION π
This page is a lil quick-and-dirty rundown of the samusrgrp command, no cap. It got written for the Debian distribution specifically because the original program straight up doesn't have a manual page of its own. π
samusrgrp is a non-interactive command line utility that can add or remove a user from a local group that exists in the SAM user database of a Microsoft Windows system (Windows NT, 2000, XP, Vista, 7, 8.1, etc.). That file is usually hanging out at \WINDOWS\system32\config\SAM on the file system of a Microsoft Windows Operating System. π
When it slays, it's silent: on success, the program does not output any information and the exit code is 0. No notes, no drama, just done. β¨
The binary program supports multiple names, which is very main character of it. If it's called under the name samusrtogrp it will assume -a mode (add user). If it's called under the name samusrfromgrp it will assume -r mode (remove user). π¦
π OPTIONS π
-hβ show summary of options. the vibe check, basically. π-aβ the user is added to the group. This option has to be followed by-uand-g. like, mandatory besties, you can't run it alone. π«Ά-rβ the user is removed from the group. This option has to be followed by-uand-g. same deal, it needs its duo. π-u <user>β user to change. You can hand over the user value as a username, or as a RID number in hexadecimal (if the username is preceded with'0x'). Usernames including international characters will probably not work. π-g <group>β group to change. The group can only be given as a group number, in hexadecimal, preceded with with'0x'. that's the only way, periodt. π-lβ lists the groups in the SAM database. π-Lβ lists the groups in the SAM database as well as their members. the deluxe version, we love a bonus feature. π-sβ print the machine SID. π¨οΈ-Hβ output human readable output. By default the program will print a parsable table unless this option is used. so if the default table is giving robot, this is your girl. π€β‘οΈπ§-Nβ do not allocate more information, only allow the editing of existing values with same size. lowkey restrictive on purpose. π-Eβ do not expand the hive file (safe mode). it's giving cautious queen energy, and honestly? valid. π‘οΈ-tβ print debug information of allocated blocks. π§-vβ print verbose information and debug messages. the yapper option, respectfully. π£οΈ
π EXAMPLES π
samusrgrp -a -u theboss -g 0x220 SAMFILE
Adds a user named 'theboss' to the group 0x220 (Administrators) π
samusrgrp -a -u 0x3ea -g 0x221 SAMFILE
Adds a user with the id '0x3aa' to the group 0x221 (Users) β¨
samusrgrp -r -u 0x3ff -g 0x221 SAMFILE
Remove a user with the id '0x3ff' from the group 0x221 (Users) π
π¨ KNOWN BUGS π¨
If the username includes international (non-ASCII) characters the program will not (usually) find it. Use the RID number instead. fr fr, just use the RID. π
π SEE ALSO π
chntpwd, reged, sampasswd β the whole friend group. π«
You will find more information available on how this program works, in the text files /usr/share/doc/chntpw/README.txt and /usr/share/doc/chntpw/MANUAL.txt π
More documentation is available at the upstream's author site: http://pogostick.net/~pnh/ntpasswd/ π
π AUTHOR π
This program was written by Petter N Hagen. π§
This manual page was written by Javier Fernandez-Sanguino <jfs@debian.org>, for the Debian GNU/Linux system (but may be used by others). π«Ά
okay that's the whole page bestie, go forth and edit your SAM files responsibly π and if you were wondering, this lil love letter to samusrgrp is dated 6th August 2014, and it comes to you from the System Manager's Manual, section 8. mwah, slay, bye π
β¨π
π¦ where this page comes from
- debian bookworm: chntpw 140201-1
- debian trixie: chntpw 140201-1.2
- fedora 43: chntpw 1.00-20.140201.fc43 Β· GPL-2.0-only
- fedora 44: chntpw 1.00-22.140201.fc44 Β· GPL-2.0-only
- ubuntu jammy: chntpw 140201-1
- ubuntu noble: chntpw 140201-1
- ubuntu questing: chntpw 140201-1.2
- ubuntu resolute: chntpw 140201-1.2build1
- ubuntu stonking: chntpw 140201-1.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms