QUESTION 1
Perhaps you are an administrator of a Unix system with multiple users, and you log in as different users from time to time. Which command could you type to see your current user identity?
a.
|
ident
|
b. |
me
|
c. |
pwd
|
d. |
id
|
QUESTION 2
In traditional Unix systems, which file contains the list of user accounts?
a.
|
/var/db/users
|
b.
|
/etc/accounts
|
c. |
/etc/group
|
d. |
/etc/passwd
|
QUESTION 3
When you type "ls -l" to view the details of the contents of your current working directory, one of the items has the following permissions:
drwxr-xr-x
What does the d at the beginning mean?
a. |
It is a directory
|
b. |
It is dynamically linked
|
c |
.It has been deleted and is in the trashcan
|
d. |
It is a duplicate file
|
QUESTION 4
On traditional Unix systems, which file contains the list of user groups and their members?
a. |
/var/db/grps
|
b. |
/etc/ugps
|
c. |
/etc/shadow
|
d. |
/etc/group
|
QUESTION 5
What is the numeric or Octal version of the following permissions for a file? -rwx r-- r--
Or, put a different way: u=rwx,g=r,o=r
a. |
|
744
|
b. |
|
655
|
c. |
|
755
|
d. |
|
311
|
QUESTION 6
You want to change the permissions on a directory named public_files so that everyone else (the "other" category of users) has the ability to go into the directory and read files, but not write to the directory.
Which command would do that for you?
a. |
|
chmod o=rx public_files
|
b. |
|
chmod ugo+ public_files
|
c. |
|
chmod go=r public_files
|
d. |
|
chmod 777 public_files
|
QUESTION 7
You want to remove write permissions for everyone including yourself on a file named "my-homework.txt"
Which command would do that for you?
a. |
chmod a-w my-homework.txt
|
b. |
umask 755 my-homework.txt
|
c. |
chmod o-w my-homework.txt
|
d. |
rm -w my-homework.txt
|
QUESTION 8
What piece of information do you need to know in order to use the su command?
|
|
a.The username of one of the administrator accounts
|
b. |
|
The password for the root account
|
c. |
|
The password for the user you are trying to become
|
d. |
|
The index number for an administrative user in the user account database
|
QUESTION 9
A file named "homework" had the following permissions: -rwxr--r--
Which command could have been typed to change the permissions to this: --wx-w---x
a. |
|
chmod 465 homework
|
b. |
|
chmod 321 homework
|
c. |
|
chomd g-r homework
|
d. |
|
chmod a-r homework
|
QUESTION 10
Why migh you use sudo instead of su?
a. |
|
Because sudo always asks for confirmation before executing a command, while su does not.
|
|
b. |
Because sudo allows you to use your own password to quickly run a task with administrative privilges, you are less tempted to endanger your system by running as root all the time.
|
|
c. |
Because sudo can make you a sandwich.
|
|
d. |
Because su is old and usually not present on Unix.
|