F23 IN3094-G7 Lab 2 Linux User and Group Management Lab Worksheet


In this lab, students will learn how to create and manage users and groups in Kali Linux. They will also practice setting permissions on files and directories and verify those permissions.

Pre-lab Setup:

Before starting the lab, ensure that each student has:
Installed Kali Linux on Oracle VirtualBox.
Installed a screenshot tool and a word processor (such as LibreOffice) to document their work.

Hand-in Instructions:

Create a new Word document to document your lab activities.
Include your name, date, and lab activity number at the start of each activity section.
Use a screenshot tool to capture images for each step where changes are made or output is displayed.
Insert the screenshots into the Word document under the relevant step, with a brief description of each screenshot.
Save your document with the filename format: LinuxLab_YourName.docx.
Submit the document according to your instructor's guidelines.

Activity 1: Creating Users

Open a terminal window in Kali Linux.
Create a new user account with the username student1 by running sudo adduser student1.
Capture a screenshot of the terminal showing the command and its output.
Add a brief description in the Word document and insert the screenshot.

Activity 2: Creating Groups

In the terminal, create a new group named projectteam by executing sudo addgroup projectteam.
Add student1 to the projectteam group by running sudo adduser student1 projectteam.
Capture a screenshot displaying both commands and their outputs.
Document the steps with descriptions and screenshots in your report.

Activity 3: Directory Creation and Permission Setting

Create a new directory named teamfiles in /home/student1 using mkdir /home/student1/teamfiles.
Change the group ownership of teamfiles to projectteam with sudo chgrp projectteam /home/student1/teamfiles.
Set the permissions to allow members of projectteam to read, write, and execute inside teamfiles using sudo chmod 770 /home/student1/teamfiles.
Confirm the permissions with ls -l /home/student1 and capture a screenshot.
Describe the changes and include the screenshot in your lab report.

Activity 4: Creating Files with Group Permissions

As student1, create a file inside teamfiles by running touch /home/student1/teamfiles/groupfile.txt.
Change the group ownership of the file to projectteam with sudo chgrp projectteam /home/student1/teamfiles/groupfile.txt.
Set group read and write permissions on the file using sudo chmod 660 /home/student1/teamfiles/groupfile.txt.
Capture a screenshot showing the file permissions.
Include a description and insert the screenshot in your report.

Activity 5: Denying and Allowing Access

Try to access the teamfiles directory and groupfile.txt as a user that is not part of the projectteam group.
Capture the error message screenshot when access is denied.
Add the user to projectteam group and attempt to access the files again.
Capture the command and successful access screenshot.
Document both attempts with descriptions and screenshots in your report.
Please make sure to follow the instructions carefully and document each step as you go. Your screenshots and descriptions will serve as proof of your ability to manage users, groups, and permissions in Linux.
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
) instead.