User Tools

Site Tools


usermanagement

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
usermanagement [2025/01/18 04:28] – created 1211112228usermanagement [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 user password**+Add user:  
 +  adduser 
  
-  - login to any sudoer group user or root +Delete user:  
-  - Use **//sudo passwd username//** to change user password +  deluser 
-  - Enter new password then you will be ask to retype you new password +
-  - Password change +
-  - +
  
-{{:screenshot_2025-01-16_144702.png?400|}}+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 password expiration.+Lock/unlock user password:  
 +  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
  
 +----
  
-{{:screenshot_2025-01-16_162659.png?400|}} +  * **Change user password**
- +
-  * **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**+
  
 +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 is changed successfully.
-The user will receive a warning 7 days before the password expires.+
  
-{{:date.png?400|}}+{{:screenshot_2025-01-16_144702.png?nolink&600|}}
  
 +  * **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.
  
 +The syntax is: ''sudo chage [option] username''
  
 +1. Displays the current password aging information.
 +  sudo chage -l username
  
 +{{:screenshot_2025-01-16_162659.png?nolink&600|}}
  
 +2. Set the account expiration date. 
 +  sudo chage -E  2025-12-31 username
  
 +{{:date.png?nolink&600|}}
  
 +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
  
 +{{:date.png?nolink&600|}}
 +-----
 +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

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki