We use sudo adduser username to create a new user
Sudo command must be used by sudoer user only.
If you want to assign the user to a group for example sudo group you can use sudo adduser username sudo
1. Fisrt User: myself
EXTRA
Add user aidel to sudo group
2. Second User: John Doe
- Ordered List ItemFirst make sure your are using a sudoer group user or root to perform sudo command.
3. Second User: Will Smith
- Ordered List ItemFirst make sure your are using a sudoer group user or root to perform sudo command.
4.Check the user
-r: Recursively removes the user’s home directory and mail spool.
-f: Forces the removal of the user account, kills processes, and deletes files.
Locks the user's account before deletion to ensure no one logs in during the process.
EXTRA
User management in Linux is a critical aspect of system administration. It involves creating, modifying, and managing user accounts and groups to ensure proper access control, system security, and resource allocation. Each user is assigned a unique identity, along with permissions and restrictions.
The sudo chage command is used in Linux to manage password aging and expiration policies for a user. It allows administrators to define and control how long a user's password remains valid, enforce password expiration, and specify warnings before password expiration.
Display the current password aging information
Set the account expiration date. The account will be disabled after this date. To set account expiration to never use sudo change -E -1 username
The user will receive a warning 7 days before the password expires.