Week 5 Topic: Users and Groups
Objective:
By the end of this activity, students should be able to:
● Understand user account management in Linux.
● Manage groups and permissions.
● Use the sudo command effectively.
Instructions:
Complete the following tasks and submit your answers in a document. Provide screenshots
where applicable.
Part 1: User Management
1. Create a new user named student1. What command did you use?
2. Set a password for student1. Provide the command.
3. Modify student1’s account to expire on December 31, 2025.
4. List all users in the system. What file stores user account details?
Part 2: Group Management
5. Create a new group called developers.
6. Add student1 to the developers group.
7. Verify that student1 is now part of developers.
8. Change the primary group of student1 to developers.
Part 3: File Permissions & Sudo Access
9. As the root user, create a directory /project. Change its group ownership to
developers and set permissions so that only members of developers can modify
files inside it.
10.Grant student1 sudo privileges. What file needs to be modified, and how do you safely
edit it?
11.Switch to student1 and execute a command using sudo. What happens if student1
is not in the sudoers file?
Submission Guidelines:
● Submit your answers in a printed document.
● Include all commands used and their outputs.
● Add screenshots where necessary.
Deadline: March 11, 2025