Users and groups | Computer Science homework help

In this week, we will again use our virtual machine. This time, we will be creating two users and granting selected permissions from one user to the other.

First, create a new user with “useradd -m <username>”. Then, repeat the command for a second user. Set a password for each user with “passwd <username>”.

Next, we will create a group for our users with “groupadd <groupname>”. Add your users to the group with “usermod -G <groupname> <username>”.

Test out logging in as your first user with the command “su – <username>”. Next, we will create three files using the following commands:

  • echo “first file” > file1
  • echo “second file” > file2
  • echo “third file” > file3

You can validate the contents of file1 with “cat file1”. Let’s validate the file permissions of our files with “ls -l”. Take a screenshot of the output. Every file has nine permissions, ignoring the first one. The first three are for the user, the next three are for the group, and the final three are for others.

Next, we are going to adjust permissions so that:

  • File1 is only readable and writeable to user1
  • File2 is readable and writeable to user1 and members of the group to which you added both users 
  • File3 is readable by all users, but writeable only by user1

To make these changes, you’ll use the “chmod” command to adjust permissions, and you’ll need to add file2 to the group our users are in using “chown :<groupname> file2”. To use the chmod command, there are two syntaxes: octal syntax and letter syntax. We are going to use the letter syntax in these examples. If you know octal syntax, feel free to use that instead.

The format is going to be “chmod <who><operation><permissions> <filename>”. The <who> value will be one of u for user, g for group, o for others, or a for all. The <operation> will be + to add permissions and – to remove permissions. The <permissions> will be any of r for read, w for write, or x for execute. Set the permissions of the files to the bulleted list above. Validate your permissions with “ls -l” and take a screenshot of the output.

Then, switch to the second user account and verify the permissions using the following commands.

  • cat file1
  • cat file2
  • cat file3
  • echo “first file” > file1
  • echo “second file” > file2
  • echo “third file” > file3

Take a screenshot of the results of these commands. If the results don’t match expectations, you can switch back to your user1 and adjust permissions again to get it right.

In your submission, include:

  • Screenshot of “ls -l” output before changing permissions
  • Screenshot of “ls -l” output after changing permissions
  • Screenshot of the validation commands as user2


  • The assignment should be double-spaced, 12-point Times New Roman font, with one-inch margins
  • Use APA for citing references and quotations
  • See the assignment rubric below for more details

Calculate the price of your order

Select your paper details and see how much our professional writing services will cost.

We`ll send you the first draft for approval by at
Price: $36
  • Freebies
  • Format
  • Formatting (MLA, APA, Chicago, custom, etc.)
  • Title page & bibliography
  • 24/7 customer support
  • Amendments to your paper when they are needed
  • Chat with your writer
  • 275 word/double-spaced page
  • 12 point Arial/Times New Roman
  • Double, single, and custom spacing
  • We care about originality

    Our custom human-written papers from top essay writers are always free from plagiarism.

  • We protect your privacy

    Your data and payment info stay secured every time you get our help from an essay writer.

  • You control your money

    Your money is safe with us. If your plans change, you can get it sent back to your card.

How it works

  1. 1
    You give us the details
    Complete a brief order form to tell us what kind of paper you need.
  2. 2
    We find you a top writer
    One of the best experts in your discipline starts working on your essay.
  3. 3
    You get the paper done
    Enjoy writing that meets your demands and high academic standards!

Samples from our advanced writers

Check out some essay pieces from our best essay writers before your place an order. They will help you better understand what our service can do for you.

Get your own paper from top experts

Order now

Perks of our essay writing service

We offer more than just hand-crafted papers customized for you. Here are more of our greatest perks.

  • Swift delivery
    Our writing service can deliver your short and urgent papers in just 4 hours!
  • Professional touch
    We find you a pro writer who knows all the ins and outs of your subject.
  • Easy order placing/tracking
    Create a new order and check on its progress at any time in your dashboard.
  • Help with any kind of paper
    Need a PhD thesis, research project, or a two-page essay? For you, we can do it all.
  • Experts in 80+ subjects
    Our pro writers can help you with anything, from nursing to business studies.
  • Calculations and code
    We also do math, write code, and solve problems in 30+ STEM disciplines.

Frequently asked questions

Get instant answers to the questions that students ask most often.

See full FAQ
    See full FAQ

    Take your studies to the next level with our experienced specialists

    Hello, we are online 24/7. Leave a message we will reply instantly