Lab 1: User Management
Objective:
- To understand and practice user management tasks on a Linux system.
Topics Covered:
- Creating Users
- Modifying User Accounts
- Managing User Passwords
- Deleting User Accounts
- Understanding User Groups
- Group Management
Lab Exercises:
Exercise 1: Creating Users
- Create a new user account named user1.
- Set an initial password for user1.
- Verify the creation of the user account.
Exercise 2: Modifying User Accounts
- Modify the home directory of user1to/home/users/user1.
- Change the default shell for user1to/bin/bash.
- Verify the changes made to the user account.
Exercise 3: Managing User Passwords
- Force user1to change the password on the next login.
- Set password aging for user1to expire in 30 days.
- Verify the password-related changes.
Exercise 4: Deleting User Accounts
- Delete the user account user1.
- Ensure that the home directory and files associated with user1are removed.
Exercise 5: Understanding User Groups
- Create a new group named staff.
- Add user1to thestaffgroup.
- Verify the group membership of user1.
Exercise 6: Group Management
- Create a new user account named user2.
- Assign both user1anduser2to thestaffgroup.
- Remove user2from thestaffgroup.
- Delete the staffgroup.
Lab Documentation:
Provide detailed instructions for each exercise, including command syntax and expected outcomes. Include explanations of the purpose behind each task.
Tips:
- Explore additional user management commands (usermod,passwd,chage,groupadd,userdel, etc.).
