Needs some Help with this command for Linux Operations Systems Display the compl
ID: 3829184 • Letter: N
Question
Needs some Help with this command for Linux Operations Systems Display the complete command that will accomplish the following actions. (ie. If you were asked to extract the second column of information from a file called "food" you would display the following: cut -f2 food (NOT just the word cut)) l. What are two different ways to determine the ownership of the/etc/passwd file? 2.Create a file in your home directory named myfile. What sequence of commands will allow you to transfer ownership of this file to the root user? 3. Who is now listed as the user owner and the group owner for the file myfile? 4. What are two different ways to determine which groups you are a member of? 5. What is the primary group of the sysadmin user? 6. What command would you use to change the sysadmin user's primary group to the adm group? 7.What command would you use to verify this change took place? What was the GID of this group? 8.Create a directory called spreadsheets in your home directory. What command would you use to remove read, write, and execute permissions from group and others for the spreadsheets directory using the rwx symbols? What command can you use to verify this change took place?? 9. Using octal permissions, assign the following permissions to the myfile file: -rwxrw-r- -? 10. What command would you use so that all new files created by you have default permissions of -rw-r- - - - -?Explanation / Answer
1)ls -l /etc/passwd
third column shows the ownership of the file.all users have a rights to read the file content but only root has ablity to change the content.
2)below is the sequence of command need to be executed.
cd
touch myfile
su //loggin with super user credential.
chown root:root myfile //give the adsolute path of the myfile
3) ls -l myfile
above command gives the file and permission details of myfile
4) groups
-id -Gn [user]
5 groups sysadmin //display the group of sysadmin
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.