usermanagement
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| usermanagement [2025/01/18 04:28] – created 1211112228 | usermanagement [2025/01/19 03:31] (current) – 1211112228 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== User Management ====== | ====== User Management ====== | ||
| - | |||
| 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. | 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. | ||
| + | ----- | ||
| - | * **Change | + | Add user: |
| + | adduser | ||
| - | - login to any sudoer group user or root | + | Delete |
| - | | + | |
| - | - Enter new password then you will be ask to retype you new password | + | |
| - | - Password change | + | |
| - | - | + | |
| - | {{:screenshot_2025-01-16_144702.png? | + | Add group: |
| + | groupadd | ||
| + | Delete group: | ||
| + | groupdel | ||
| - | * **Manage Password aging and expiration** | + | Change user password: |
| + | passwd | ||
| - | 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 | + | Lock/ |
| + | passwd -l | ||
| + | passwd -u | ||
| - | - //**sudo chage [option] username**// | + | Switch user: |
| + | su | ||
| - | * **sudo chage -l username** | + | Show user information: |
| - | Display the current password aging information | + | id |
| + | ---- | ||
| - | {{: | + | |
| - | + | ||
| - | | + | |
| - | 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** | + | |
| + | 1. Type this command to change user password. | ||
| + | sudo passwd username | ||
| - | {{:date.png?400|}} | + | 2. Enter new password. Then, you will be ask to retype your new password. |
| - | * **sudo chage -W 7 username** | + | 3. Your password |
| - | The user will receive a warning 7 days before the password | + | |
| - | {{:date.png?400|}} | + | {{:screenshot_2025-01-16_144702.png?nolink& |
| + | * **Manage password aging and expiration** | ||
| + | The '' | ||
| + | The syntax is: '' | ||
| + | 1. Displays the current password aging information. | ||
| + | sudo chage -l username | ||
| + | {{: | ||
| + | 2. Set the account expiration date. | ||
| + | sudo chage -E 2025-12-31 username | ||
| + | {{: | ||
| + | The account will be disabled after this 2025-12-31. To set account expiration to **never:** | ||
| + | sudo change -E -1 username | ||
| + | 3. Set a warning to the user 7 days before the password expires. | ||
| + | sudo chage -W 7 username | ||
| + | {{: | ||
| + | ----- | ||
| + | Good user management is essential to make sure your system stay secure from unknown intruders. | ||
usermanagement.1737174507.txt.gz · Last modified: 2025/01/18 04:28 by 1211112228
