Cheatography
https://cheatseheet.pages.dev
Commands and Files useful for understanding local account management in linux.
User Account Commands
Command |
Purpose |
|
Create a new user |
|
Interactive user creation (Debian/Ubuntu) |
|
Modify a user account |
|
Delete a user |
|
Set or change a user's password |
|
Manage password aging and expiration |
|
Display user and group IDs |
|
Display current username |
|
Display user information (if installed) |
User Information
Command |
Purpose |
|
User and group IDs |
|
Logged-in users |
|
Logged-in users and activity |
|
Login history |
|
Last login per user |
|
Currently logged-in usernames |
User Switch
Command |
Purpose |
|
Switch user |
|
Execute command as another user |
|
Start a root login shell |
|
|
Group Management
Command |
Purpose |
|
Create a group |
|
Modify a group |
|
Delete a group |
|
Manage group memberships and passwords |
|
Display user's groups |
|
Switch to another group |
Common User Account Attributes
Attribute |
Description |
Managed By |
Username |
Login name |
|
UID |
User ID |
|
Primary Group |
Default group |
|
Supplementary Groups |
Additional groups |
|
Home Directory |
User's home folder |
|
Login Shell |
Default shell |
|
Password |
Password lifetime |
|
Account Expiration |
Account expiry date |
|
Account Lock Status |
Locked or unlocked |
|
GECOS |
Full name, phone, etc. |
|
|
|
Account Locking & Expiration
Command |
Purpose |
|
Lock account password |
|
Unlock account password |
|
Lock user account |
|
Configure password aging |
|
View password aging |
Home Directory & Skeleton
Command |
Purpose |
|
Create home directory |
|
Specify home directory |
|
Specify skeleton directory |
|
Specify login shell |
Important Files
File |
Purpose |
|
User accounts |
|
Password hashes |
|
Groups |
|
Group passwords |
|
User account defaults |
|
|
|
User profile template |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by hlhlhl