From a34c92095132075e8aa2d4497e2b531c4b56db30 Mon Sep 17 00:00:00 2001 From: mokha Date: Sat, 18 May 2019 16:40:03 -0600 Subject: complete another exercise --- README.md | 23 ++++++++++++++++++++++- exercises/chapter-8.8 | 13 +++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 exercises/chapter-8.8 diff --git a/README.md b/README.md index be2e9c0..8c712a2 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,28 @@ The `rw-` indicates read and write permissions for the owner of the file. The following `r--` indicate read permissions for members of the group. THe following `r--` indicate read permissions for everyone else. -8. How many user groups exist on your system? How did you get your answer? What groups are you a member of and what is your default group? How many groups is root a member of, on your system? How did you obtain your answer? If used any commands, show the commands and their outputs. +8. +How many user groups exist on your system? +How did you get your answer? +What groups are you a member of and what is your default group? +How many groups is root a member of, on your system? +How did you obtain your answer? +If used any commands, show the commands and their outputs. + +```bash +モ users +mokha +モ id -Gn +staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin com.apple.sharepoint.group.1 _appstore _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2 +モ groups +staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin com.apple.sharepoint.group.1 _appstore _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2 +モ groups mokha +staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin com.apple.sharepoint.group.1 _appstore _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2 +モ groups root +wheel daemon kmem sys tty operator procview procmod everyone staff certusers localaccounts admin com.apple.sharepoint.group.1 _appstore _lpadmin _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2 +``` + + 9. Create a file test1 in your present working directory and set its access privileges to read and write for yourself, read for the users in your group, and none to everyone else. What command did you use to set privileges? Give another command that would accomplish the same thing. 10. The user ‘sarwar’ sets access permissions to his home directory by using the command chmod 700 $HOME. If the file cp.new in his home directory has read permissions to 777, can anyone read this file? Why or why not? Explain your answer. 11. What is the effect of each command? Explain your answers. diff --git a/exercises/chapter-8.8 b/exercises/chapter-8.8 new file mode 100644 index 0000000..a4dc026 --- /dev/null +++ b/exercises/chapter-8.8 @@ -0,0 +1,13 @@ +Script started on Sat May 18 16:38:03 2019 +bash-3.2$ groups +staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin com.apple.sharepoint.group.1 _appstore _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2 +bash-3.2$ whoami +mokha +bash-3.2$ groups mokha +staff everyone localaccounts _appserverusr admin _appserveradm _lpadmin com.apple.sharepoint.group.1 _appstore _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2 +bash-3.2$ groups root +wheel daemon kmem sys tty operator procview procmod everyone staff certusers localaccounts admin com.apple.sharepoint.group.1 _appstore _lpadmin _lpoperator _developer _analyticsusers com.apple.access_ftp com.apple.access_screensharing com.apple.access_ssh com.apple.sharepoint.group.2 +bash-3.2$ exit +exit + +Script done on Sat May 18 16:38:47 2019 -- cgit v1.2.3