Operating Systems Concepts & Design
bobsquadsudo make me a sandwichBeginning with this lab, you will be accessing an AWS instance - a virtual system hosted on the cloud - to access a Ubuntu server environment. If a lab or lab section explicitly states that you must work in your AWS environment, do so. There will be a biweekly check to make sure you are using the AWS environment to try out commands and perform work.
Go to your cloned repository folder (likely named ceg2350f25-yourgithubusername). Refer back to Lab 01 if you need a reminder for how to clone your repository. You only need to clone your repository once on each system.
Create a new directory, Lab02
Create a file named README.md in the Lab02 folder. The Lab 02 Template can be copied from this link:
https://raw.githubusercontent.com/pattonsgirl/CEG2350/refs/heads/main/docs/Labs/Lab02/LabTemplate.mdYou may refer to additional resources outside of the recommended resources provided.
Any resource that you use that contributes to your understanding of exercises in this lab should be cited in the Citations section of your lab answers. To add citations, provide the site and a summary of what it assisted you with. If generative AI was used, include which generative AI system was used and what prompt(s) you fed it.
If you make mistakes with commands in the lab, note them! Writing down what went wrong and what the correction was will significantly help your learning journey. If you cannot find a correction, it will help the TAs or myself understand what point you reached and determine some potential solutions.
For this course, you will be creating and editing files in Linux. Therefore, you will need to get acquainted with at least one command line text editor. vim will be the editor used in course demonstrations.
vim
nano
An email was sent to your wright.edu account inviting you to join an AWS Academy Course for this class.
Follow the instructions in AWS Academy Setup to set up your AWS environment and make your first ssh connection to your AWS instance that you’ll use throughout the semester.
The written instructions are thorough, but if you would like more visuals visit the Pilot -> Content -> Labs -> Getting Started for a video companion guide to creating an instance. The video guide sets up connections with WSL2 specifically, but PowerShell or other Terminals will have similar key parts - know where you put your file, the name of it, and the system path to it and locate your IPv4 address to your AWS instance once created.
Wherever your lab instructions state that the exercise must be completed in your instance, it must be completed in your instance. If a lab or lab section explicitly states that you must work in your AWS environment, do so. There will be a biweekly check to make sure you are using the AWS environment to try out commands and perform work.
If you break your ability to connect to your instance by:
In the Lab Template, you will write out the where your private key file is located and the ssh command to use to remotely connect to the AWS instance.
For each command below, write a verbose description of what it does. Then, assess whether or not the command as given is “good” and give an explanation to defend your stance.
Sample:
chmod 777 file.txtchmod, manchmod u+r bubbles.txtchmod u=rw,g-w,o-x banana.cabanachmod a=w snow.mdchmod 751 programchmod -R ug+w shareResources
Peruse these resources before beginning work on Parts 2 & 3. You may cite them as references in your Lab Template
useradd
adduser in the lab, but this is a great breakdown of the pieces adduser uses and useradd needs you to specifybobPerform the following exercise on your AWS instance.
Replace BOB with a username your create based on your first initial followed by last name. For example, “John Smith” would be jsmith
adduser, sudo, su, chown, pwd, cd, whoami, exitBOB
BOB with your username, see instructions aboveBOB’s home directory?ubuntu add files to BOB’s home directory? Why or why not?
BOBBOB’s home directoryBOB add files to BOB’s home directory? Why or why not?
ubuntu user
ubuntu user does not have an account password. You’ll have to find a command that can end your session…ubuntu user’s home directorysquadPerform the following exercise on your AWS instance.
Reminder to replace references to BOB with your username of first initial, last name (ex. jsmith)
addgroup, usermod, chown, chgrp, su, sudo, mkdirCreate a folder named share in the ubuntu user’s home directory and create some files and sub folders in the folder to play with.
squadubuntu and BOB to the squad group
BOB with your username, see instructions abovesquad to view the ubuntu user’s home directory contents.share directory in the ubuntu user’s home directory so that squad is the group for the whole folder and members of squad can make changes in the folder.
shareBOB. Test that BOB can view the contents of the ubuntu user’s home directory.
BOB create a file in share. Describe the full set of permissions / settings that enabled BOB to do this action.sudo make me a sandwichPerform the following exercise on your AWS instance.
sudoubuntu user, in the ubuntu user’s home directory, make a file with sudo named madewithsudo.txtroot user, in the ubuntu user’s home directory, make a file with named madewithroot.txtmadewithsudo.txt and madewithroot.txtroot, ubuntu, and BOB) can view or edit or changes permissions to:
sharemadewithsudo.txtubuntu the owner and squad the group associated with madewithsudo.txt. Give both the ability to view and edit the file.ubuntu can use sudo, but BOB cannot. Find, implement, and test a way to fix this.Resources
sudo
ubuntu user has passwordless sudo - as in you won’t be prompted for your account password. If you try sudo on most Linux machines, you will be prompted for a password. AWS has a special setup for the default system account.Lab02 folder in your GitHub repo
Your answers should be cleanly presented in your GitHub repository. Citations should be included as needed. Include which generative AI system was used and what prompts were used if generative AI was used.