usermod
The command that changes an existing user account.
In more detail
usermod -G sets the supplementary groups to exactly the list given, removing others; -aG adds to the list. Other options change the shell, comment, home, lock state and expiry.
Example
usermod -aG ops chen adds ops without removing chen's other groups.Related terms
- useradd — The command that creates a user account.
- supplementary group — An extra group a user belongs to in addition to the primary group, granting access to that group's files.
Taught in
- Logins, su, sudo And SSH Between Hosts — Red Hat Certified System Administrator (EX200) Exam Prep
- Drill: People, Packages And Time — Red Hat Certified System Administrator (EX200) Exam Prep
- Mock Exam, Part 2: Real Machines And The Ten Costly Mistakes — Red Hat Certified System Administrator (EX200) Exam Prep
- Starters, Leavers And A Service Account: Accounts On Two Families — CompTIA Linux+ (XK0-006) Exam Prep
- The Pager Command That Opened A Root Shell: sudo, su And Least Privilege — CompTIA Linux+ (XK0-006) Exam Prep
- Three Audit Findings And A Phone: Password Policy, Lockouts And MFA — CompTIA Linux+ (XK0-006) Exam Prep