Question

In: Computer Science

Compare the details of the passwd and shadow files under /etc/ –Who is the owner and...

  1. Compare the details of the passwd and shadow files under /etc/

–Who is the owner and group for each of the files?

–What permissions are assigned for these files?

–Are the permissions consistent with the results of activity you did before.

–Discuss the permissions in light of principle of least privilege.

2. Check the details of the log directory under /var/

–Who is the owner and group of the directory?

–What permissions are assigned for this directory?

–Discuss the permissions in light of principle of least privilege.

3. What happens to a file when the primary group of its user owner changes?

USE LINUX to answer

Solutions

Expert Solution

Who is the owner and group for each of the files?

owner group
passwd:-rw-r--r-- 1 root root 2669 Aug 2 12:44 /etc/passwd
shadow:-rw-r----- 1 root shadow 1606 Aug 2 12:48 /etc/shadow

What permissions are assigned for these files?

passwd:-rw-r--r--
shadow:-rw-r-----

Are the permissions consistent with the results of activity you did before.

this permissions remain same until life of linux unless we change it manually

Discuss the permissions in light of principle of least privilege.

R W X
user
group
other

R 2
W 4
X 1

if we set the permission to read for owner group and other then 2 2 2 will be set

Answer 2
*********
root is the owner and root is the group of var directory

drwxr-xr-x // read write execute for owner , read execute for group and read execute for other

if group change than rights of that group will be applied instead of owner group


if you have any doubt then please ask me without any hesitation in the comment section below , if you like my answer then please thumbs up for the answer , before giving thumbs down please discuss the question it may possible that we may understand the question different way and we can edit and change the answers if you argue, thanks :)


Related Solutions

This lab will explore the password files. a) Open a terminal window and type less /etc/passwd....
This lab will explore the password files. a) Open a terminal window and type less /etc/passwd. Which line describes the root account? b) Type ls –l /etc/passwd. Who is the owner of the passwd file? What are the permissions? c) Type less /etc/shadow. What is in the password filed for most of these accounts? d) Type ls –l /etc/shadow. Who owns this file and how do the permissions differ from the /etc/passwd file? e) Type cat /etc/default/useradd. What is the...
--> Take a copy of the / etc / passwd file to the root user's home...
--> Take a copy of the / etc / passwd file to the root user's home directory. --> Transfer the username-userID information in this file to the file named user_idler.txt. --> Export the file named user_idler.txt in alphabetical order to user_list.txt file --> Show how many lines the file user_idler.txt consists of. --> Find the number of lines for the letter in the file named user_idler.txt
$ grep/ sbin/nologin$/etc/passwd| cut -d “:”-f1| short| less explan the output
$ grep/ sbin/nologin$/etc/passwd| cut -d “:”-f1| short| less explan the output
can you please do the following? (8) Step 8: type the following command: sort /etc/passwd |...
can you please do the following? (8) Step 8: type the following command: sort /etc/passwd | head -5 What is the output? Notice that this pipe can be simplified cat /etc/passwd | head -5 What is the output for this? You could accomplish the same thing more efficiently with either of the two commands: head -5 /etc/passwd head -5 < /etc/passwd (9) Step 9: The command displays all the files in the current directory sorted by file size ls -al...
1. Create customized versions of the /etc/login.defs and /etc/default/useradd files in order to meet the new...
1. Create customized versions of the /etc/login.defs and /etc/default/useradd files in order to meet the new user account criteria you provide. 2. Research online for various Linux utilities that can be used to store and sort various Linux log files. Have them share their findings with the class.
Develop an application that searches for files on a wild card basis (a*.c, .c, *a, etc)...
Develop an application that searches for files on a wild card basis (a*.c, .c, *a, etc) and then displays the resultant file names in all CAPITALS using pipes in a "multiprocess setup" C language must be used
In the field of economics, there are few men who cast a bigger shadow than Milton...
In the field of economics, there are few men who cast a bigger shadow than Milton Friedman. One of his (among many) central ideas is the Friedman Doctrine which states that corporations have no social responsibility (as long as they play by the rules) beyond profit maximization. This approach is often criticized by those that believe corporations should be good "corporate citizens".   You will research the life and career of Milton Friedman providing an overview of his life and main...
How does the representation of knowledge in computers (documents, photos, music, files etc.) differ from the...
How does the representation of knowledge in computers (documents, photos, music, files etc.) differ from the representation of knowledge in humans? How are they similar? Use real-world examples to back up your stance as well as using the Virtual Library for additional research. Do NOT use Wikipedia. Use appropriate academic resources. APA structure and format expected. Use in-text citations and and references Please.
my_list = {} Dictionary holding all the lists. s_files = [] # Files with size UNDER...
my_list = {} Dictionary holding all the lists. s_files = [] # Files with size UNDER 50 KB. m_files = [] # Files with size AT LEAST 50 KB and UNDER 5 MB . l_files = [] # Files with size AT LEAST 5 MB, no upper limit. directories = [] # Directories, regardless of size. Write a program using python that loops over each file in a specified directory and checks the size of each file.Create 2-tuple with the...
Compare and contrast in details human capital and signaling models.
Compare and contrast in details human capital and signaling models.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT