Summary

Summary

In this chapter, we have examined how to manage files and directories, and how to work with the shell. In addition, we have examined the commands used to write shell scripts, and other commonly used shell commands. Since the shell is the administrator’s interface to the operating system, it’s important that administrator’s become familiar with shell commands and procedures.

Questions

1. 

What command would be used to set read permissions (for the current user) on the file /usr/local/lib/libproxy.a?

  1. chmod +r /usr/local/lib/libproxy.a

  2. chmod a+r /usr/local/lib/libproxy.a

  3. chmod g+r /usr/local/lib/libproxy.a

  4. chmod u+r /usr/local/lib/libproxy.a

 A. Read permissions can be set with the r permissions flag.

2. 

What command would be used to set read permissions for all users on the file /usr/local/lib/libproxy.a?

  1. chmod +r /usr/local/lib/libproxy.a

  2. chmod a+r /usr/local/lib/libproxy.a

  3. chmod g+r /usr/local/lib/libproxy.a

  4. chmod u+r /usr/local/lib/libproxy.a

 B. Read permissions for all users can be set with the r flag in combination with the a (all) flag.

3. 

What command would be used to set write permissions for the current user’s group on the file /usr/local/lib/libproxy.a?

  1. chgrp +w /usr/local/lib/libproxy.a

  2. chmod a+w /usr/local/lib/libproxy.a

  3. chmod g+w /usr/local/lib/libproxy.a

  4. chmod u+w /usr/local/lib/libproxy.a

 C. Write permissions for the group can be set with the w flag in combination with the g (group) flag.

4. 

What command would be used to remove write permissions for the current user’s group on the file /usr/local/lib/libproxy.a?

  1. chgrp -w /usr/local/lib/libproxy.a

  2. chmod a-w /usr/local/lib/libproxy.a

  3. chmod g-w /usr/local/lib/libproxy.a

  4. chmod u-w /usr/local/lib/libproxy.a

 C. Write permissions for the group can be removed with the w flag in combination with the g (group) flag, but using the - rather than the + operator.

5. 

What command would be used to set the sticky bit on /public?

  1. chmod +t /public

  2. chmod +s /public

  3. chmod +S /public

  4. chmod t+s /public

 A. The sticky bit is always set with the t operator.

6. 

What command would be used to remove the sticky bit on /public?

  1. chmod -t /public

  2. chmod -s /public

  3. chmod -S /public

  4. chmod t-s /public

 A. The sticky bit is removed with the t operator, but with the - rather than the + operator.

7. 

What command would be used to set setuid on /public/shell?

  1. chmod +t /public/shell

  2. chmod +s /public/shell

  3. chmod +S /public/shell

  4. chmod t+s /public/shell

 B. setuid is always removed with the s operator.

8. 

What command would be used to remove the setuid bit on /public/shell?

  1. chmod -t /public/shell

  2. chmod -s /public/shell

  3. chmod -S /public/shell

  4. chmod t-s /public/shell

 B. setuid is always removed with the s operator, but with the - rather than the + operator.

Answers

1. 

A. Read permissions can be set with the r permissions flag.

2. 

B. Read permissions for all users can be set with the r flag in combination with the a (all) flag.

3. 

C. Write permissions for the group can be set with the w flag in combination with the g (group) flag.

4. 

C. Write permissions for the group can be removed with the w flag in combination with the g (group) flag, but using the - rather than the + operator.

5. 

A. The sticky bit is always set with the t operator.

6. 

A. The sticky bit is removed with the t operator, but with the - rather than the + operator.

7. 

B. setuid is always removed with the s operator.

8. 

B. setuid is always removed with the s operator, but with the - rather than the + operator.



Part I: Solaris 9 Operating Environment, Exam I
 
ASPTreeView.com
 
Evaluation has АѕДФБ¶expired.
Info...