Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Familiarize yourself with the user management commands (useradd, userdel, usermod, passwd), commands to change file permissions (chown, chgrp, chmod) and the commands from previous practice

image text in transcribed

Familiarize yourself with the user management commands (useradd, userdel, usermod, passwd), commands to change file permissions (chown, chgrp, chmod) and the commands from previous practice tasks. Use the command line to complete the tasks: - Create 3 user accounts with names from (A) (in lowercase), and home directories /homeame_of_the_user - set passwords (arbitrary) for these accounts - Add additional information about each user by entering their last name (B) - move third user's home directory to /home/last_name_of_the_user - try to log in with these accounts - try to log in as first user, open terminal, and switch to root - Log in as regular user (who is allowed to switch to root) and switch to root. - Change second user's shell to another shell (for example, /bin/sh) - Create new group (C) (in lowercase) and add those 3 users to it. - Create directory/home/(C) and set owners: owner: first user group: (C) - Open 3 terminal sessions: first with first user's privileges, second with second user's privileges, third - root. (You can use su to switch users.) In the first terminal, create the file test.txt with arbitrary content in the /home/(C) directory, and set the permission to it so that only the first user or root can read the contents of this file. Try to read the contents of the file in the second terminal. - Set permissions on the file/home/(C)/test.txt, so that only the first user (or root) can read the contents of this file, and users in the group (C) can modify its contents (for example, append some text to the end of the file). Other users (that are not members of the group (C)) shouldn't have any rights to read or modify the file. Make sure that the permissions are set properly by trying to read the contents or append text to the file, using different user accounts. - Complete task (D) (chose only your option)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

Plot the given points A(3,1), B(-6,0), C(-2,-5), D(1, -3)

Answered: 1 week ago