Review Questions and Answers

1. 

You are the network administrator for your company. You have just tried to add a user account with the useradd command but you received the following message:

 UX: useradd: WARNING: uid is reserved. 

What is the most likely cause of the message?

  1. The UID you specified is already being used by another account. Use a different UID.

  2. The UID you specified is already being used by another account. Use the -o option with useradd.

  3. The UID you specified is in the 0-99 range. Use a different UID.

  4. The UID you specified is in the 0-99 range. Use the -o option with useradd.

c. user ids in the 0 99 range are reserved for system user accounts. although it's possible to create a user with a uid in this range, it's not recommended. use a uid in the 100 60000 range instead.

2. 

You are the Solaris administrator for your company. One of your users, who is using the C shell, wants to know the location and name of his initialization file or files. What do you tell him? (Choose all that apply.)

  1. $HOME/.login

  2. $HOME/.kshrc

  3. $HOME/.cshrc

  4. $HOME/.profile

a, c. for users that use the c shell, the initialization files are located in their home directory, and are named .cshrc and .login .

3. 

You are the Solaris administrator for a major performing arts company. You want to add a user, aamini, to the directors group. This should be a secondary group membership. Which command should you execute?

  1. usermod -G directors aamini

  2. usermod -g directors aamini

  3. usermod aamini -G directors

  4. usermod aamini -g directors

a. to add a user to a secondary group, use usermod -g . the user's name appears after the arguments in the command. the -g argument modifies the user's primary group.

4. 

You are the Solaris administrator for your company. Because of merging corporate divisions, you need to delete the finacct group (GID 1111) from your server. Which command should you use to accomplish this?

  1. groupdel finacct

  2. groupdel 1111

  3. groupdel -g 1111

  4. delgroup finacct

  5. delgroup 1111

  6. delgroup -g 1111

a. to delete groups, use the groupdel command. when using groupdel , you must supply the group's name, not its gid.

5. 

One of your users is attempting to run multiple shells in the same terminal window at once in Solaris 9. However, he doesn't seem to be having much luck. What advice should you give him?

  1. Configure the profile file in your home directory to support the multiple shells you wish to run concurrently.

  2. Set up a second user profile for yourself with the desired shell and then use the su command to assume your secondary identity.

  3. Execute the shell -d path command at the command line, where path is the absolute path to the secondary shell you wish to run (such as /bin/sh, /bin/csh, or /bin/ksh).

  4. It's not going to happen. One user can run only one shell at a time in Solaris 9.

d. no matter how hard you try, one user can run only one shell at a time from the same terminal. if you use the su command, you will assume another user's identity, and possibly another shell. however, this still fits under the `one user, one shell` axiom.

6. 

You are the network administrator for your company. Because of changes in corporate structure, you are required to change your network's group structure. All 50 users in the finance group need to be members of a newly created corpfin group (instead of the finance group), which should have a GID of 1776. What is the easiest way to accomplish this goal?

  1. Create a new group called corpfin with a GID of 1776. Move all finance users into this group by using the usermod command. Delete the finance group.

  2. Create a new group called corpfin with a GID of 1776. Move all finance users into this group by using the groupmod command. Delete the finance group.

  3. Use the groupmod finance -g 1776 -n corpfin command to rename the finance group and give it the appropriate GID.

  4. Use the groupmod -g 1776 -n corpfin finance command to rename the finance group and give it the appropriate GID.

d. groups can be given a new gid and new name with the groupmod command. in this case, modifying the existing group would be a lot easier than creating a new group and moving all the users. if you were to move users from one group to another, you would use the usermod command, not groupmod .

7. 

One of your Solaris servers has the following lines in its /etc/passwd file:

 root:x:0:1:Super-User:/:/sbin/sh daemon:x:1:1::/: bin:x:2:2::/usr/bin: sys:x:3:3::/: adm:x:4:4:Admin:/var/adm: lp:x:71:8:Line Printer Admin:/usr/spool/lp: uucp:x:5:5:uucp Admin:/usr/lib/uucp: nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico smmsp:x:25:25:SendMail Message Submission Program:/: listen:x:37:4:Network Admin:/usr/net/nls: nobody:x:60001:60001:Nobody:/: noaccess:x:60002:60002:No Access User:/: nobody4:x:65534:65534:SunOS 4.x Nobody:/: qdocter:x:100:10:author:/export/home/qdocter:/bin/sh jsmith:x:1001:101:Jane Smith::/bin/ksh jdoe:x:1002:101:John Doe:/export/home/jdoe:/bin/csh 

Based on the information presented, which of the following statements is true? (Choose all that apply.)

  1. The jdoe user is using the C shell.

  2. The jsmith user does not have a home directory configured.

  3. The UID of the root account is 0.

  4. The qdocter user is a member of a default group.

a, b, c, d. all of the answers are correct. the c shell is specified for jdoe with the /bin/csh variable. the sixth field configures a user's home directory, and that field is empty for jsmith . the third field is the uid, and the root account always has the uid of 0. the qdocter account is a member of group 10, which is the built-in staff group.

8. 

You are the Solaris server administrator for your company. You need to bring the server down for a system backup. Before you do so, you want to see the list of currently logged-in users, so you can warn them to log off. Which command can you use to accomplish this?

  1. list

  2. user

  3. who

  4. login

c. to see a list of currently logged-in users, use the who command. the list and user commands do not exist. the login command can be used to prompt for a new user login.

9. 

You are presented with the following information from an /etc/shadow file:

 root:AaSfeBzrNVeao:11920:::::: daemon:NP:6445:::::: bin:NP:6445:::::: sys:NP:6445:::::: adm:NP:6445:::::: lp:NP:6445:::::: uucp:NP:6445:::::: nuucp:NP:6445:::::: smmsp:NP:6445:::::: listen:*LK*::::::: nobody:NP:6445:::::: noaccess:NP:6445:::::: nobody4:NP:6445:::::: qdocter:DXvo9wTm2tZmQ:11899:5:42:7:21:: 

Based on the information, which of the following statements is true? (Choose all that apply.)

  1. The root account has a password of AaSfeBzrNVeao.

  2. The root account's password has been changed more recently than the qdocter account's password.

  3. The listen account is locked and cannot be used.

  4. The qdocter account expires in 21 days.

b, c. the root account's password, when encrypted, is aasfebzrnveao. however, this is not the real account password. the root account's password was changed 21 days after qdocter 's password was changed. the listen account is locked, as shown by *lk* in the second field. the qdocter account has no expiration date set.

10. 

You are the network administrator for your company. You want to add a user, abradley, to your system. The user should have a UID of 3422, have the admin group as her primary group, the mdte group as her secondary group, and have her home directory created automatically. Which command should you execute?

  1. useradd -u 3422 -d /export/home/abradley -g admin -G mdte abradley

  2. useradd -u 3422 -d /export/home/abradley -m -G admin -g mdte abradley

  3. useradd abradley -u 3422 -d /export/home/abradley -m -g admin -G mdte

  4. useradd -u 3422 -d /export/home/abradley -m -g admin -G mdte abradley

d. the useradd command has a lot of switches that can be used. to specify a user's uid, use -u . the -d switch specifies the location of the home directory, but requires -m to create the directory automatically if it does not already exist. the -g switch is for primary group membership, and -g is for secondary group membership. finally, the user login name appears after the switches.

11. 

You are the Solaris administrator for your company. You are concerned that someone is trying to hack the superuser's password. Which file can you check to see whether there have been any failed attempts to switch users?

  1. /etc/default/su

  2. /etc/default/sulog

  3. /var/adm/sulog

  4. /var/adm/su

c. the /var/adm/sulog file tracks all attempts to use the su command, whether successful or not. a plus sign indicates a successful su , whereas a minus sign indicates that the attempt failed. the /etc/default/su file can be used to modify sulog behavior. the /etc/default/sulog and /var/adm/su files do not exist.

12. 

You are presented with the following information from an /etc/group file:

 root::0:root other::1: bin::2:root,bin,daemon sys::3:root,bin,sys,adm adm::4:root,adm,daemon uucp::5:root,uucp mail::6:root tty::7:root,adm lp::8:root,lp,adm nuucp::9:root,nuucp staff::10: daemon::12:root,daemon sysadmin::14: smmsp::25:smmsp nobody::60001: noaccess::60002: nogroup::65534: macaddct::102:mgantz author::104:qdocter 

Based on the information presented, which of the following statements are true? (Choose all that apply.)

  1. The Group ID for the smmsp group is 25.

  2. The password for the macaddct group is mgantz.

  3. The staff group has no members.

  4. The sysadmin group has a User ID of 14.

a, c. the smmsp built-in group has a gid of 25 (located in the third field). mgantz is a member of the macadct group, but the group has no password. passwords would be in the second field. the staff group has no members. the sysadmin group has a gid of 14, but groups do not have uids.

13. 

In Solaris 9, the shell provides which of the following functions? (Choose all that apply.)

  1. Provides a graphical interface for user interaction

  2. Acts as a command interpreter

  3. Functions as a high-level batch programming language

  4. Defines the user environment variables as specified in the /etc/users/profiles file

b, c. in solaris 9, the shell acts as both a command interpreter and a high-level batch programming language. a graphical user interface provides graphical interaction. the /etc/users/ profiles file does not exist.

14. 

You are the Solaris administrator for your company. A new working division was recently formed, and you need to create a new group named nwtrade. Which command should you use to accomplish this task?

  1. addgroup -o nwtrade

  2. addgroup nwtrade

  3. groupadd -o nwtrade

  4. groupadd nwtrade

d. to add a group, use the groupadd command. if no specific gid is required, and the gid of the group will not duplicate another group, then the only argument needed is the group name. to specify a gid, use the -g switch. to specify a duplicate gid, use -o .

15. 

Which of the following are features of the Korn shell in Solaris 9? (Choose all that apply.)

  1. Bourne-shell-compatible syntax

  2. Job editing

  3. Repeat last command

  4. Supports aliases

  5. Protection from overwriting files

a, b, d, e. the korn shell uses bourne-shell-compatible syntax, allows for job editing, supports aliases, and enables you to protect yourself from overwriting files. the c and bourne shells enable you to repeat the last command entered.

16. 

Which Bourne shell environment variable allows for customization of the command prompt?

  1. PS1

  2. PROMPT

  3. Prompt

  4. Command

a. in the bourne and korn shells, the command prompt can be customized by using the ps1 environment variable. in the c shell, the prompt can be customized with the prompt variable.

17. 

You are the Solaris 9 administrator for your company. You are using the Solaris Management Console to set up user accounts. Which of the following are requirements for user passwords when setting them up in SMC? (Choose all that apply.)

  1. Passwords must be at least six characters long.

  2. Passwords must be at least eight characters long.

  3. The first six characters must include at least two alphabetic characters and at least two numeric or special characters.

  4. The first six characters must include at least two alphabetic characters and at least one numeric or special character.

  5. Passwords cannot contain any part of the user's login name.

a, d. when setting up user passwords by using the solaris management console, passwords must be at least six characters long, and the first six characters must include at least two alphabetic characters and at least one numeric or special character. although it's not recommended that the password contain any part of the user's login name, it's not a requirement.

18. 

One of your network users poses a question about user shells. She occasionally needs to use the su command to switch users and assume her bosses' network credentials. She wants to know how the shell responds when she uses the su command to assume another identity. What should you tell her?

  1. She will retain her original shell.

  2. She will get the shell specified for the account identity she is assuming.

  3. She will get the default shell specified in the /etc/default/su file.

  4. She will get the default shell specified in the /etc/default/users file.

b. when users use the su command, they get the shell of the account they are assuming the role of. after the user exits the su session, they are returned to their original shell. the /etc/ default/su file affects the behavior of the sulog file. the /etc/default/users file has nothing to do with su behavior.

19. 

You are the Solaris administrator for your company. One of your users in the finance department, cmalcolm, has just left for a better job. You need to delete the user's account along with the user's home directory. Which command should you execute?

  1. userdel -h cmalcolm

  2. userdel -r cmalcolm

  3. userdel -d /export/home/cmalcolm cmalcolm

  4. userdel cmalcolm

b. to delete the user's home directory when removing the user's account, use userdel -r . the -d and -h options do not exist for userdel .

20. 

You are the Solaris administrator for your network. You require users to use either the Bourne or Korn shells. You want to set up a default initialization file, so that when new users are created, the accounts have the settings you require. Which file(s) should you modify to accomplish this goal? (Choose all that apply.)

  1. /etc/skel/local.profile

  2. /etc/skel/local.login

  3. /etc/skel/local.cshrc

  4. /etc/skel/local.kshrc

a. the lone initialization file for users of the bourne and korn shells is .profile . skeleton files (which can be used as defaults) are located in the /etc/skel directory. users of the c shell would use the .login and .cshrc files.

Answers

1. 

C. User IDs in the 0-99 range are reserved for system user accounts. Although it's possible to create a user with a UID in this range, it's not recommended. Use a UID in the 100-60000 range instead.

2. 

A, C. For users that use the C shell, the initialization files are located in their home directory, and are named .cshrc and .login.

3. 

A. To add a user to a secondary group, use usermod -G. The user's name appears after the arguments in the command. The -g argument modifies the user's primary group.

4. 

A. To delete groups, use the groupdel command. When using groupdel, you must supply the group's name, not its GID.

5. 

D. No matter how hard you try, one user can run only one shell at a time from the same terminal. If you use the su command, you will assume another user's identity, and possibly another shell. However, this still fits under the "one user, one shell" axiom.

6. 

D. Groups can be given a new GID and new name with the groupmod command. In this case, modifying the existing group would be a lot easier than creating a new group and moving all the users. If you were to move users from one group to another, you would use the usermod command, not groupmod.

7. 

A, B, C, D. All of the answers are correct. The C shell is specified for jdoe with the /bin/csh variable. The sixth field configures a user's home directory, and that field is empty for jsmith. The third field is the UID, and the root account always has the UID of 0. The qdocter account is a member of group 10, which is the built-in staff group.

8. 

C. To see a list of currently logged-in users, use the who command. The list and user commands do not exist. The login command can be used to prompt for a new user login.

9. 

B, C. The root account's password, when encrypted, is AaSfeBzrNVeao. However, this is not the real account password. The root account's password was changed 21 days after qdocter's password was changed. The listen account is locked, as shown by *LK* in the second field. The qdocter account has no expiration date set.

10. 

D. The useradd command has a lot of switches that can be used. To specify a user's UID, use -u. The -d switch specifies the location of the home directory, but requires -m to create the directory automatically if it does not already exist. The -g switch is for primary group membership, and -G is for secondary group membership. Finally, the user login name appears after the switches.

11. 

C. The /var/adm/sulog file tracks all attempts to use the su command, whether successful or not. A plus sign indicates a successful su, whereas a minus sign indicates that the attempt failed. The /etc/default/su file can be used to modify sulog behavior. The /etc/default/sulog and /var/adm/su files do not exist.

12. 

A, C. The smmsp built-in group has a GID of 25 (located in the third field). mgantz is a member of the macadct group, but the group has no password. Passwords would be in the second field. The staff group has no members. The sysadmin group has a GID of 14, but groups do not have UIDs.

13. 

B, C. In Solaris 9, the shell acts as both a command interpreter and a high-level batch programming language. A graphical user interface provides graphical interaction. The /etc/users/ profiles file does not exist.

14. 

D. To add a group, use the groupadd command. If no specific GID is required, and the GID of the group will not duplicate another group, then the only argument needed is the group name. To specify a GID, use the -g switch. To specify a duplicate GID, use -o.

15. 

A, B, D, E. The Korn shell uses Bourne-shell-compatible syntax, allows for job editing, supports aliases, and enables you to protect yourself from overwriting files. The C and Bourne shells enable you to repeat the last command entered.

16. 

A. In the Bourne and Korn shells, the command prompt can be customized by using the PS1 environment variable. In the C shell, the prompt can be customized with the prompt variable.

17. 

A, D. When setting up user passwords by using the Solaris Management Console, passwords must be at least six characters long, and the first six characters must include at least two alphabetic characters and at least one numeric or special character. Although it's not recommended that the password contain any part of the user's login name, it's not a requirement.

18. 

B. When users use the su command, they get the shell of the account they are assuming the role of. After the user exits the su session, they are returned to their original shell. The /etc/ default/su file affects the behavior of the sulog file. The /etc/default/users file has nothing to do with su behavior.

19. 

B. To delete the user's home directory when removing the user's account, use userdel -r. The -d and -h options do not exist for userdel.

20. 

A. The lone initialization file for users of the Bourne and Korn shells is .profile. Skeleton files (which can be used as defaults) are located in the /etc/skel directory. Users of the C shell would use the .login and .cshrc files.




Solaris 9. Sun Certified System Administrator Study Guide
Solaris 9 Sun Certified System Administrator Study Guide
ISBN: 0782141811
EAN: 2147483647
Year: 2003
Pages: 194

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