What command (include the full syntax) would you use to change access control for the group to read, write and execute.   chmod g+rwx   Explanation: This command gives access to everyone in the same group as the file to owner to read, write and execute

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

 

 

Question 1: What command (include the full syntax) would you use to change access control for the group to read, write and execute.

 

chmod g+rwx <files/directory>

 

Explanation: This command gives access to everyone in the same group as the file to owner to read, write and execute

 

Question 2: How would you grant full access only to Test user1 and test user2 to the directory students?

 

This can be done in 4 steps

 

  1. 1.Create a new group named teststudents

sudo groupadd teststudents

  1. 2.Add the users testuser1 and testuser2 to teststudents

sudo adduser testuser1

sudo adduser testuser2

usermod -aG teststudents testuser1

usermod -aG teststudents testuser2

  1. 3.Change the owner of students directory to teststudents group

sudo chown testuser1:teststudents students

or

sudo chown testuser2:teststudents students

  1. 4.Change the permission to only groups

sudo chmod 070 students

 

Question 3: explain the effect of the command chmod 777 text4 on the file text4 (if necessary, use the man command

Explanation: chmod sets the permissions for a file based on the values we provide in the mode field

 

It is an octal number. Here, first field means value for users, second field means value for groups and third field means value for others

7 means full access: read, write and execute

1 means execute

4 means write

6 means read

 

Thus, 777 will give full access(read, write and execute) on text4 file to everyone in the system

 

 

Question 4: Examine the following extract from a shadow file:

What is the encryption algorithm used for the /etc/shadow file?

 

The hashfile algorithm can be determined by the starting of 2nd filed (after first colon) of the shadow file

 

It can be one of these:

$1: MD5 hashing algorithm

$2: Blowfish Algorithm

$3: Eksblowfish Algorithm

$4: NT hashing algorithm

$5: SHA-256 Algorithm

$6: SHA-512 Algorithm

 

Question 5: Refer to the same shadow file extract. What is the status of the gnome-initial-setup account?

The account has been disabled

More information can be found here:

https://www.tldp.org/LDP/lame/LAME/linux-admin-made-easy/shadow-file-formats.html

We can view the shadow file extract using this command

sudo cat /etc/shadow | grep gnome

 

 

 

 

Question 6: Refer to the same shadow file extract. When will user1 and user2 have to change passwords.

 

This is the output of user1 in shadow file using the above command:

 

 

testuser1:$6$8om5avuh$8X/p04ogp.MyWXXkax88XkUIFy56JSUFUb5Csvp20XIkZ6zZoL2b67w9jWJCNguFaPxpd2YOAX9laZOzsOJ0V1:18338:0:99999:7:::

 

This means that password must be changed (99999 indicates user can keep his or her password unchanged for many, many years) Please refer the same url for this shadow file format

 

 

Question 7: Explain how did you verify if user1 and user2 have read, write, and execute access to the directory students content.

We can simly check that others cannot access the file/folder using the below account from their account. We get permission denied

cat <somefile>

or

ls students

Then we can run the same command by logging in from testuser1 or testuser2 account and we should be able to see contents or list the directory

 

Another way to check would be to do

ls -la students

on the terminal which would show us the permission bits and owner and group of the directory.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Securing Systems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education