1. | Consider the following entry in a passwd file of a user:
bgates:x:420:200:bill_gates:/export/home/bgates:/bin/sh What is the user ID for this user?
|
|
2. | Consider the following entry in a passwd file of a user:
bgates:x:420:200:bill_gates:/export/home/bgates:/bin/sh What is the group ID for this user?
|
|
3. | Consider the following entry in a shadow file of a user:
bgates:*LK*:abc12356thab1:::::: What does this entry indicate about the user account? (Choose all that apply.)
|
|
4. | What is the maximum number of characters you can use in defining a user name?
|
|
5. | What is the maximum number of secondary groups a user can belong to?
|
|
6. | A user with username bobgone has left your organization. You want to delete the user account without deleting the files that belong to the user. Which of the following will you do?
|
|
7. | What is the maximum legal value a UID can have in Solaris 10?
|
|
8. | A UID 0 can be assigned to which of the following accounts? (Choose all that apply.)
|
|
9. | Which of the following is a site initialization file for the Bourne shell?
|
|
10. | Which of the following files contains the encrypted password?
|
|
11. | In order to create a user account, you issued the useradd command without specifying all the options. To find the default values for the unspecified options, the useradd command will look into which of the following files?
|
|
Answers
1. | þ A. The first field in the passwd file entry is the UID. ý B is incorrect because this is a GID, and C is incorrect because this indicates that the password is encrypted. D is incorrect because a passwd file entry does have information about the user ID. |
2. | þ B. The second field in the passwd file entry is the GID. ý A is incorrect because this is a UID, and C is incorrect because this indicates that the password is encrypted. D is incorrect because a passwd file entry does have information about the group ID. |
3. | þ A. The value *LK* of the <password> file in the shadow file entry means the account is locked. ý B is incorrect because this is the encrypted password; C is incorrect because this indicates that the password is locked; and D is incorrect because this account does have a password, which is represented in encrypted form in the second field. |
4. | þ C. A user login name can contain up to eight characters including uppercase or lowercase alphabets and numerals (0–9). It must begin with a letter, there should be no space, and it should include at least one lowercase letter. ý A, B, and D are incorrect because the maximum number of characters that can be used to compose a user name is eight. |
5. | þ C. A user can be associated with one primary group and 15 secondary groups at maximum. ý A, B, and D are incorrect because the maximum number of secondary groups that a user can belong to is 15. |
6. | þ C. If you want to delete the files along with the user account, you need to use the -r option with the userdel command. ý A, B, and D are incorrect because it will not delete the account. D is incorrect because it is the -r option, not the -d option, that deletes the user's home directory along with the user account. |
7. | þ D. The user ID is a positive integer that you can make out of a signed 32-bit (i.e., the maximum value is 231 - 1 = 2,147,483,647. However, the values for the UID should be in the range from 100 to 60, 000 for regular users. ý A, B, and C are incorrect because these are not the largest integers you can make with a signed 32-bit. E is wrong because there is a limit on the maximum value a UID can have. |
8. | þ B. The root account always has UID 0. ý A and D are incorrect because the UID 0 should be assigned only to the root account. C is incorrect because the root account always has the UID 0. |
9. | þ C. The site initialization file for the Korn and Bourne shells is /etc/profile, and the site initialization file for the C shell is /etc/.login. ý A and B are incorrect because these are not the site initialization files for the Bourne shell. D is incorrect because the site initialization files don't live in the home directories. |
10. | þ B. The /etc/shadow file contains the encrypted password information for each user account. ý A is incorrect because the /etc/passwd file only contains an x in the password field, indicating that the encrypted password exists in the /etc/shadow file. C is incorrect because the /etc/group file contains information about groups, not about individual users. D is incorrect because there is no such system file as /etc/password. |
11. | þ D. The /usr/sadm/defadduser file contains the default values for the options of the useradd command. ý A is incorrect because the /etc/paaswd file contains the values assigned to the user account, which are not necessarily the default values. B and C are incorrect because there are no such files as /etc/default/useradd and /etc/sadm/defadduser that come with the Solaris OS. |