Self Test


The following questions will help you measure your understanding of the material presented in this chapter. Read all the choices carefully because there might be more than one correct answer. Choose all correct answers for each question.

1. 

Which of the following is the correct name for the administrative account on a Solaris 10 system created by default? (Choose all that apply.)

  1. superuser

  2. root

  3. administrator

  4. admin

  5. manager

image from book

2. 

You are a system administrator of your organization, and you suspect that some users have attempted to switch to the root user by using the su command. Which of the following files will you inspect?

  1. /var/adm/log

  2. /var/adm/sulog

  3. /etc/adm/syslog

  4. /etc/adm/loginlog

  5. /etc/adm/superlog

image from book

3. 

Which of the following commands can you use to change the group ownership of a file?

  1. chown

  2. chmod

  3. chgrp

  4. passwd

image from book

4. 

The first column of a file entry in the output of the ls -l command is:

    -rwxr-x--- 

Which permissions does the file have?

  1. No execute permission for the owner.

  2. In order to have an access to the file, you either have to be the owner or a member of the group that owns the file.

  3. Write permission for both the owner and the group.

  4. Execute permission for the owner.

image from book

5. 

The first column of a file entry in the output of the ls -l command has the form:

    -rwsr-xr-x 

What kind of permissions does the file have?

  1. No execute permission for the owner.

  2. The sticky bit is set on the file.

  3. The setuid permission is set on the file.

  4. The group has no write permission to the file.

image from book

6. 

Which of the following commands can be used to set the setgid permission on a file?

  1. setgid

  2. setuid

  3. chmod

  4. chgrp

image from book

7. 

The first column of the output of the ls -l command on a file has the form:

    -rwsr-xr-t 

What are the octal permissions set on the file?

  1. 5755

  2. 654

  3. 4755

  4. 755

image from book

8. 

A user listed in which of the following files will be able to log in remotely to your system without having to type the password?

  1. /etc/hosts

  2. $HOME/.rhosts

  3. /home/.rlogin

  4. /var/syslog

image from book

9. 

Shell scripts that have their setuid and setgid permission set enhance the security of the file system.

  1. True

  2. False

image from book

10. 

Directories that have their sticky bits set compromise the security of the directory.

  1. True

  2. False

image from book

11. 

Which of the following commands will display information about the last three reboots of your system?

  1. last reboot -3

  2. last reboot | head -3

  3. last reboot | tail -3

  4. who -r | head -3

  5. who -r | tail -3

image from book

12. 

You are looking for the name of the log file that contains the log of attempts made to use the su command. Which file contains the full path to this log file?

  1. /etc/default/su

  2. /etc/default/sulog

  3. /var/adm/sulog

  4. /etc/default/login

image from book

Answers

1. 

þ B. Root is the administrative account created by default when you install the system.

ý A, C, D, and E are incorrect because there are no such accounts created by default.

2. 

þ B. All the usages of the su command are listed in the /var/adm/sulog file.

ý A, C, D, and E are all incorrect because they do not specify the file that records the usage of the su command.

3. 

þ A and C. You can change the group ownership with the chgrp command. You can also change the group ownership with the chown command by optionally giving the GID along with the UID when you issue the command.

ý B is incorrect because the chmod command is used to change permissions on the file, not the ownership. D is incorrect because the passwd command is used to manage passwd-related things, not to change the group ownership of a file.

4. 

þ B and D. The last three hyphens represent that the world has no permissions to the file. The first hyphen represent the file type, and the following three characters—rwx—specify that the owner has read, write, and execute permission to the file.

ý A is incorrect because the permission bits for the owner are rwx. C is incorrect because the write bit for the group contains a hyphen, not a w.

5. 

þ C and D. When you set the setuid permission on a file, the x is replaced with s for the user execute permission, so C is correct. D is correct because there is a hyphen (-) instead of a w in the write permission bit for the group.

ý A is incorrect because s represents that the owner still has execute permission, but when any user executes this file, the running process will acquire the permissions of the owner. B is incorrect because s in the output does not stand for sticky bit; the sticky bit would be set in the last permission bit and is represented by the character t.

6. 

þ C. chmod is the command that is used to set the setuid and setgid permissions and also to set the sticky bit.

ý A and B are incorrect because setuid and setgid refer to set user identification and set group identification; they are not the commands to accomplish this task. D is incorrect because the chgrp command is used to change the group, not to set the setgid permission.

7. 

þ A. Both setgid and sticky bit are on and they amount to 5000 (4000 for setgid + 1000 for sticky bit). Other permissions are 755.

ý B and D are incorrect because the setgid and sticky bit are not accounted for. C is incorrect because it does not account for the sticky bit.

8. 

þ B. Each entry in the $HOME/.rhosts file contains the host-usemame pair. If a host-user exists in the file, that means the specified user from the specified host is allowed to log in remotely to this system without a password.

ý A, C, and D are incorrect because these are the wrong names for the files to accomplish this task.

9. 

þ B. The setuid and setgid permissions allow the user to execute the files with these permissions to acquire the owner's permissions. Hence they compromise security instead of improving it.

ý A is incorrect because setuid and setgid permissions compromise security.

10. 

þ B. When sticky bit is set on a directory (e.g., a public directory), nobody other than the file owner, the directory owner, or a privileged user can delete a file in the directory.

ý A is incorrect because sticky bit improves the security by allowing only the directory owner, or the file owner, or a privileged user to delete a file in the directory on which the sticky bit is set.

11. 

þ C, The last reboot command generates the list of all the reboots, which is piped into the tail -5 command that displays the last three entries from the list.

ý A is incorrect because this form of the command is the wrong form for the results you want. B is incorrect because it will display the first three reboots, not the last three. D and E are incorrect because the who -r command displays the system run level, not the reboot information.

12. 

þ A. The log for the su command usage is stored in the file whose full path is shown by the value of the SULOG field in the /etc/default/su file.

ý B is incorrect because the /etc/default/sulog file does not exist by default. C is incorrect because the /var/adm/sulog file is the default file in which the su log attempts will be stored, not the file that contains the full path to the log file. D is incorrect because the /etc/default/login file is used to store the security policy regarding the logins, not the su command attempts.




Sun Certified System Administrator for Solaris 10 Study Guide Exams 310-XXX & 310-XXX
Sun Certified System Administrator for Solaris 10 Study Guide Exams 310-XXX & 310-XXX
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net