Theory
A new student joins LabOne
A new student needs a login on the shared Linux lab server, but the admin must give the right access and keep the system safe. How does the admin create the account, set a password, and later update or remove it? That is the core of user account maintenance.
Theory
Think of a hostel register
User accounts are like hostel records.
- Each person gets a unique entry.
- The password is the room key.
- If someone changes role or leaves, the record must be updated or closed.
Theory
The idea, formally
Maintaining user accounts means managing Linux users by creating, updating, securing, and deleting accounts as needed. It helps the system identify users, control permissions, and prevent unauthorized access.
At a glance
Common Linux account management commands
| Command | Purpose | Example |
|---|---|---|
| useradd | Create a new user | useradd rupesh |
| passwd | Set or change password | passwd rupesh |
| usermod | Modify an existing account | usermod -aG sudo rupesh |
| userdel | Delete a user account | userdel rupesh |
Think first
Think before reading
Before tapping, which command would you use to create a new user account?
Show the answer
useradd is used to create a new user account.
Quiz
Which command is used to change a user password in Linux?
- passwd
- userdel
- mkdir
- chmod
Show the answer
passwd
passwd changes a password. userdel deletes users, mkdir makes directories, and chmod changes permissions.
Think first
Another quick check
If a user joins an admin group, which command is most related to modifying that account? Think mentally first.
Show the answer
usermod is used to modify an existing account, including group membership.
Watch out
The trap
Do not confuse account creation with password setting. Creating the user does not automatically mean the account is fully ready for secure use, because a password and proper group settings may still be needed.
Quiz
Which command is used to remove a user account?
- userdel
- usermod
- passwd
- groups
Show the answer
userdel
userdel removes a user account. usermod changes an account, passwd handles passwords, and groups shows group membership.
Theory
Connect it to administration
This topic is important in real Linux administration, shared labs, and servers. A strong exam answer usually lists the commands, their purpose, and one security point such as unique usernames and strong passwords.
Summary
Key takeaways
- User account maintenance keeps Linux access organized and secure.
useraddcreates users.passwdsets or changes passwords.usermodchanges existing accounts.userdelremoves accounts.- Memory hook: add, secure, modify, remove.