commands
usermod — modify a local account
Administrative operation. -a with -G appends supplementary groups; -G alone replaces that list. Existing processes retain their credentials. Review account identity and authorization; do not casually grant admin membership. Example is help only. Example assumes a fresh account lab fixture; VM-only examples require explicit authorization.
Formal Syntax & Structure
linux syntaxlinux
usermod [OPTION] LOGINParameters & Attributes
| Name | Type | Description |
|---|---|---|
| -a | option | Use with -G to add listed supplementary groups without dropping existing groups. |
| -G | option | Takes a comma-separated supplementary group list; replaces membership unless used with -a. |
| LOGIN | operand | existing account name |
Return Value
exit status and output
Administrative operation. -a with -G appends supplementary groups; -G alone replaces that list. Existing processes retain their credentials. Review account identity and authorization; do not casually grant admin membership.
Working Example
Example Snippetlinux
usermod --help >/dev/null && printf "help available\n"