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:
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:
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.
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:
We are a professional custom writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework.
Yes. We have posted over our previous orders to display our experience. Since we have done this question before, we can also do it for you. To make sure we do it perfectly, please fill our Order Form. Filling the order form correctly will assist our team in referencing, specifications and future communication.
2. Fill in your paper’s requirements in the "PAPER INFORMATION" section and click “PRICE CALCULATION” at the bottom to calculate your order price.
3. Fill in your paper’s academic level, deadline and the required number of pages from the drop-down menus.
4. Click “FINAL STEP” to enter your registration details and get an account with us for record keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
5. From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.