commands
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| commands [2025/01/12 11:34] – 1211112319 | commands [2025/01/17 16:54] (current) – 1211112319 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | |||
| ====== How to create and delete users ====== | ====== How to create and delete users ====== | ||
| Line 25: | Line 26: | ||
| **// | **// | ||
| Add user //aidel// to sudo group\\ | Add user //aidel// to sudo group\\ | ||
| + | * use **//sudo adduser username sudo//** | ||
| + | |||
| + | |||
| {{: | {{: | ||
| Line 97: | Line 101: | ||
| | | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ====== 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. | ||
| + | |||
| + | * **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 how long a user's password remains valid, enforce password expiration, and specify warnings before password expiration. | ||
| + | |||
| + | - //**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 to never use **sudo change -E -1 username** | ||
| + | |||
| + | |||
| + | {{: | ||
| + | |||
| + | * **sudo chage -W 7 username** | ||
| + | The user will receive a warning 7 days before the password expires. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
commands.1736681678.txt.gz · Last modified: 2025/01/12 11:34 by 1211112319
