user
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| user [2025/01/18 08:24] – 1211112299 | user [2025/01/18 08:46] (current) – 1211112299 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| **Note: Make sure to [[installation# | **Note: Make sure to [[installation# | ||
| + | ----- | ||
| ===== How to create a user ===== | ===== How to create a user ===== | ||
| This section will show you how to create a user. We will be creating three users: **yourself, John Doe and Will Smith**. | This section will show you how to create a user. We will be creating three users: **yourself, John Doe and Will Smith**. | ||
| + | ----- | ||
| * **First User: Yourself** | * **First User: Yourself** | ||
| Line 72: | Line 73: | ||
| {{: | {{: | ||
| + | ----- | ||
| ===== How to delete user ===== | ===== How to delete user ===== | ||
| This section will show you how to delete users. | This section will show you how to delete users. | ||
| + | ----- | ||
| 1. Type the following command to delete user. | 1. Type the following command to delete user. | ||
| Line 101: | Line 104: | ||
| * **Lock User Before Deleting** | * **Lock User Before Deleting** | ||
| - | Locks the user's account | + | Locks the user's account to ensure no one logs in during the process |
| + | passwd -l username | ||
| ----- | ----- | ||
| ==== Flags for userdel command ==== | ==== Flags for userdel command ==== | ||
| Line 107: | Line 112: | ||
| | | ||
| ----- | ----- | ||
| - | + | You have learned how to create | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | ====== User Management ====== | + | |
| - | User management in Linux is a critical aspect of system administration. It involves creating, modifying, and managing user accounts and groups | + | |
| - | + | ||
| - | * **Change user password** | + | |
| - | + | ||
| - | - login to any sudoer group user or root | + | |
| - | - Use **//sudo passwd username// | + | |
| - | - Enter new password then you will be ask to retype you new password | + | |
| - | - Password change | + | |
| - | - | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | + | ||
| - | * **Manage Password aging and expiration** | + | |
| - | + | ||
| - | 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 | + | |
| - | + | ||
| - | - //**sudo chage [option] username**// | + | |
| - | + | ||
| - | * **sudo chage -l username** | + | |
| - | Display the current password aging information | + | |
| - | + | ||
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | * **sudo chage -E 2025-12-31 username** | + | |
| - | Set the account expiration date. The account will be disabled after this date. | + | |
| - | To set account expiration | + | |
| - | + | ||
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | * **sudo chage -W 7 username** | + | |
| - | The user will receive a warning 7 days before the password expires. | + | |
| - | + | ||
| - | {{: | + | |
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
| - | + | ||
user.1737188654.txt.gz · Last modified: 2025/01/18 08:24 by 1211112299
