User Tools

Site Tools


user

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
user [2025/01/18 07:36] – [How to delete user] 1211112299user [2025/01/18 08:46] (current) 1211112299
Line 3: Line 3:
  
 **Note: Make sure to [[installation#Enabling root and superuser on Debian|enable root and superusers]] before you proceed to avoid any errors.** **Note: Make sure to [[installation#Enabling root and superuser on Debian|enable root and superusers]] before you proceed to avoid any errors.**
 +-----
 ===== 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 32: Line 33:
 {{:whatsapp_image_2025-01-12_at_13.28.50_2303cca1.jpg?nolink&600}} {{:whatsapp_image_2025-01-12_at_13.28.50_2303cca1.jpg?nolink&600}}
  
-You can also [[Sudoers|add sudoers without sudo here]].+**Note: This method may not work in Debian, you can use [[Sudoers|this]] method instead.**
 ----- -----
  
Line 72: Line 73:
 {{:whatsapp_image_2025-01-11_at_23.37.20_98252dfd.jpg?nolink&600}} {{:whatsapp_image_2025-01-11_at_23.37.20_98252dfd.jpg?nolink&600}}
  
 +-----
 ===== 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 before deletion to ensure no one logs in during the process.+Locks the user's account to ensure no one logs in during the process before deletion. 
 +  passwd -l username 
 ----- -----
-**//EXTRA//**+==== Flags for userdel command ====
  
- {{:screenshot_2025-01-12_193134.png?400|}}+ {{:screenshot_2025-01-12_193134.png?nolink&600|}}
 ----- -----
- +You have learned how to create and delete users! Click this [[usermanagement|link]] to further know how to manage user accounts.
- +
- +
- +
-====== 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//** to change user password +
-  - Enter new password then you will be ask to retype you new password +
-  - Password change +
-  -  +
- +
-{{:screenshot_2025-01-16_144702.png?400|}} +
- +
- +
-  * **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 +
- +
- +
-{{:screenshot_2025-01-16_162659.png?400|}} +
- +
-  * **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** +
- +
- +
-{{:date.png?400|}} +
- +
-  * **sudo chage -W 7 username** +
-The user will receive a warning 7 days before the password expires. +
- +
-{{:date.png?400|}} +
- +
- +
- +
- +
- +
- +
- +
- +
- +
user.1737185766.txt.gz · Last modified: 2025/01/18 07:36 by 1211112299

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki