Chapter 10 Administering Users and Groups

¡Supera tus tareas y exámenes ahora con Quizwiz!

User environment files typically come from where? A. /etc/skel B. /home/ userid C. $HOME D. ~ E. /etc/

A. /etc/skel The skeleton directory, /etc/skel, typically contains the user environment files that are copied to the account's home directory when it is created. Therefore, option A is the correct answer. Options B, C, and D all contain references to home (or potential home) directories. That is where the user environment files end up, but not where they come from. Thus options B, C, and D are wrong answers. The /etc/ directory is where the global environment files reside. Therefore, option E is also an incorrect choice.

Which of the following are fields in an /etc/shadow file record? (Choose all that apply.) A. Password expiration date B. Account expiration date C. Password D. Comment E. Default shell

A. Password expiration date B. Account expiration date C. Password The password expiration date, account expiration date, and password are all legitimate fields in a /etc/shadow file record. Therefore, options A, B, and C are correct answers. The comment and default shell are fields in the /etc/passwd file. Thus, options D and E are incorrect choices.

Which of the following will allow you to change an account's /etc/shadow file record data? (Choose all that apply.) A. The passwd command B. The usermod command C. The userdel command D. The getent command E. The chage command

A. The passwd command B. The usermod command C. The userdel command E. The chage command The passwd, usermod, userdel, and chage commands can all manipulate (or remove) an account's /etc/shadow file record data in some way. Therefore, options A, B, C, and E are all correct. While the getent command will allow you to display selected records from the /etc/shadow file, it will not allow you to manipulate data records within the file. Therefore, option D is the only incorrect choice.

Which of the following are fields within an /etc/passwd file record? (Choose all that apply.) A. User account's username B. Password C. Password change date D. Special flag E. UID

A. User account's username B. Password E. UID The user account's username, password (though it typically only contains an x), and UID are all legitimate fields in an /etc/passwd file record. Therefore, options A, B, and E are correct answers. The password change date and special flag are fields in the /etc/shadow file. Thus, options C and D are incorrect choices.

Which of the following are options used in the /etc/fstab file to designate a filesystem as one that uses quotas? (Choose all that apply.) A. usrquota B. quotaon C. grpquota D. quotacheck E. aquota.user

A. usrquota C. grpquota The usrquota and grpquota options are /etc/fstab settings used to enable user and group quotas for a filesystem. Therefore, options A and C are correct answers. Options B and D contain commands that are used with managing filesystem quotas. Thus, options B and D are wrong answers. The aquota.user is a file that is created when the quotacheck -cu command is employed. Therefore, option E is an incorrect choice.

Which of the following commands displays information about the account issuing the command? (Choose all that apply.) A. whoami B. who am i C. cat $HOME/.bashrc D. cat $HOME/.profile E. id

A. whoami B. who am i E. id The whoami, who am i, and id commands will all display information about the current account that is issuing the commands. Therefore, options A, B, and E are correct answers. While the cat commands may display user environment files in the account's home directory, they do not display information concerning the account. Thus, options C and D are incorrect choices.

Which of the following files and directories may be involved in setting up the environment for all system users? (Choose all that apply.) A. /etc/bash_profile/ B. /etc/profile C. /etc/profile.d/ D. /etc/bashrc E. /etc/bash.bashrc

B. /etc/profile C. /etc/profile.d/ D. /etc/bashrc E. /etc/bash.bashrc Depending on the Linux distribution currently in use, the files (and directory) in options B, C, D, and E may be involved in setting up the global environment. The directory in option A, while similar to a user environment filename, is made up. Therefore, option A is the only incorrect choice.

The last command, by default, pulls its data from what file? A. The /var/run/utmp file B. The /var/log/wtmp file C. The /var/log/wtmp.1 file D. The /etc/shadow file E. The /etc/passwd file

B. The /var/log/wtmp file The last command by default pulls its data from the /var/log/wtmp file. Therefore, option B is the correct answer. The w command uses data from the /var/run/utmp file, so option A is a wrong choice. The last command can pull information from an older saved wtmp file, such as /var/log/wtmp.1, but it does not do so by default. Thus, option C is a wrong choice. The /etc/shadow and /etc/passwd files do not contain any data that can be used with the last command. Therefore, options D and E are incorrect answers.

Which of the following commands will allow you to switch temporarily from your account's default group to another group you are a member of? A. The usermod command B. The newgrp command C. The groups command D. The groupadd command E. The groupmod command

B. The newgrp command The newgrp command will let you switch temporarily from your account's default group to another group with whom you have membership. Therefore, option B is the correct answer. The usermod command could make that switch, but it is not best for temporary situations, so it is an incorrect choice. The groups command allows you to display group information, but not change groups, so it also is a wrong answer. The groupadd and groupmod commands deal with group management, but not temporarily switching an account's default group. Therefore, options D and E are also incorrect choices.

Which of the following commands will allow you to view the NUhura account's record data in the /etc/passwd file? (Choose all that apply.) A. getent NUhura passwd B. cat /etc/passwd C. passwd NUhura D. grep NUhura /etc/passwd E. getent passwd NUhura

B. cat /etc/passwd D. grep NUhura /etc/passwd E. getent passwd NUhura Though not very efficient, the cat /etc/passwd command would allow you to view the NUhura account's record within the /etc/passwd file. The grep NUhura /etc/passwd and getent passwd NUhura commands also would allow you to see the NUhura record. So options B, D, and E are correct choices. The getent command in option A has got the username and filename flip-flopped, so it is an incorrect choice. Also, the passwd NUhura command attempts to change the account's password instead of display its file record, so option C is also an incorrect answer.

Which of the following commands could be used to view the members of the NCC-1701 group? (Choose all that apply.) A. groups NCC-1701 B. getent group NCC-1701 C. getent groups NCC-1701 D. grep NCC-1701 /etc/group E. grep NCC-1701 /etc/groups

B. getent group NCC-1701 D. grep NCC-1701 /etc/group The getent group NCC-1701 and grep NCC-1701 /etc/group commands would both allow you to see the various NCC-1701 group members. Therefore, options B and D are correct answers. The groups command is for viewing an account's various group memberships. Therefore, option A is a wrong answer. It is always tempting to add an s to the /etc/group filename, because of the groups command. However, it is the group file and not the groups file. Thus, options C and E are incorrect choices.

A problem has occurred concerning group quotas on three filesystems. You need to quickly remove all filesystems' quota limits to temporarily resolve this issue. What is the best command to employ? A. vi /etc/fstab B. quotaoff -a C. quotacheck -cg D. quotacheck -cu E. umount

B. quotaoff -a To quickly remove quota limits on all filesystems, you would use the quotaoff -a command. Therefore, option B is the correct answer. Editing the /etc/fstab would take too long because you would have to remove the quota options and then unmount and remount all the filesystems. Thus, option A is a wrong answer. The quotacheck utility creates either the aquota.group file, if the -cg options are used, or the aquota.user file, if the -cu switches are used, or both files if -cug is employed. However, it does nothing for quickly turning off filesystems' quotas. Thus, options C and D are incorrect answers. The umount command will not turn off filesystems' quotas, and therefore option E is also an incorrect choice.

You create an account using the appropriate utility, except for some reason the account's home directory was not created. Which of the following most likely caused this to occur? A. The HOME directive is set to no. B. You did not employ super user privileges. C. The CREATE_HOME directive is not set. D. The INACTIVE directive is set to -1. E. The EXPIRE date is set and it is before today.

C. The CREATE_HOME directive is not set. If the CREATE_HOME directive is not set or it is set to no, when a user account is created no home directory will be created by default. Most likely this caused the problem, so option C is the correct answer. The HOME directive determines what base directory name is used when creating home directories for new accounts, so option A is a wrong answer. If you did not employ super user privileges, you would not have been able to even create the account, so option B is a wrong choice. The INACTIVE directive pertains to when an account will be considered inactive, so option D is also an incorrect answer. The EXPIRE directive is involved with account expiration and not home directory creation. Therefore, option E is also an incorrect choice.

You need to edit quota grace periods. Which of the following commands should you use? A. edquota -u B. edquota -g C. edquota -t D. edquota -G E. edquota --grace

C. edquota -t The edquota -t command will edit quota grace periods. Therefore, option C is the right answer. The edquota -u command edits a designated user's quota limits. Thus, option A is a wrong answer. The edquota -g command edits a designated group's quota limits. Therefore, option B is also an incorrect answer. The edquota -G command and edquota --grace command are made up. Thus, both options D and E are incorrect choices.

Which of the following commands is the best one to add JKirk as a member to a new group called the NCC-1701 group and not remove any of the account's previous group memberships? A. usermod -g NCC-1701 JKirk B. usermod -G NCC-1701 JKirk C. usermod -aG NCC-1701 JKirk D. groupadd NCC-1701 E. groupmod NCC-1701 JKirk

C. usermod -aG NCC-1701 JKirk The usermod -aG NCC-1701 JKirk command would add JKirk to the NCC-1701 group as a member and not remove any of the account's previous group memberships. Therefore, option C is the correct answer. The usermod -g NCC-1701 JKirk command would change the JKirk account's primary group membership, so option A is a wrong answer. The command in option B would add the JKirk account as a member to the NCC-1701 group, but it would remove any of the account's previous group memberships. Thus, option B is an incorrect answer. The groupadd NCC-1701 command would only add the NCC-1701 group. Therefore, option D is a wrong answer as well. The groupmod command is for modifying groups, and so the command in option E would have undesirable results. Thus, option E is an incorrect choice.

Which of the following commands will display CPU load data along with information concerning users who are currently logged into the system? A. The who command B. The id command C. The whoami command D. The w command E. The last command

D. The w command The w command displays CPU load information for the last 1, 5, and 15 minutes as well as data about users who are currently accessing the system. Therefore, option D is the correct answer. The who command will display information concerning users who are currently logged into the system, but not CPU load data. Thus, option A is a wrong answer. The id command displays user account information, not CPU load data or active user info. Therefore, option B is also a wrong choice. The whoami command only displays the username of the current user issuing the command. Thus, option C is an incorrect answer. The last command displays past and present system access information for user accounts but nothing concerning CPU load data. Thus, option E is an incorrect choice.

Your boss has asked you to remove KSingh's account and all his home directory files from the system immediately. Which command should you use? A. usermod -r KSingh B. rm -r /home/KSingh C. userdel Ksingh D. userdel -r KSingh E. usermod -d KSingh

D. userdel -r KSingh To immediately remove the KSingh account and all his home directory files, using super user privileges you would use the userdel -r KSingh command. Therefore, option D is the correct answer. There is no -r option for the usermod command, so option A is a wrong answer. The rm -r /home/KSingh command would only remove the account's home directory files and not delete the user account. Therefore, option B is an incorrect answer. The userdel command without any options would only delete the account and not remove any of its home directory files, so option C is a wrong choice. The -d option on the usermod command is for changing an account's home directory. Therefore, option E is also an incorrect choice.

A user has logged into the tty3 terminal. Which of the following user environment files is executed first if found in the user's home directory? A. The .bash_login file B. The .bashrc file C. The .profile file D. The .bash.bashrc file E. The .bash_profile file

E. The .bash_profile file The .bash_profile user environment file is run first if it is found in the user account's home directory. Therefore, option E is the right answer. The .bash_login and .profile user environment files would be ignored if they existed alongside the .bash_profile file within the user's home directory. Thus, options A and C are wrong answers. The .bashrc file is typically called to execute from one of the other user environment files for an interactive login session. Thus, option B is also an incorrect answer. The .bash.bashrc file, though similar in name to a global environment file, does not exist. Therefore, option D is an incorrect choice.

You use the useradd -D command to view account creation configuration directives. What file does this command pull its displayed information from? A. The /etc/passwd file B. The /etc/shadow file C. The /etc/group file D. The /etc/login.defs file E. The /etc/default/useradd file

E. The /etc/default/useradd file The useradd -D command allows you to view the account creation configuration directives in the /etc/default/useradd file. Therefore, option E is the correct answer. The /etc/passwd, /etc/shadow, and /etc/group files do not contain account creation configuration directives, so options A, B, and C are wrong answers. While the /etc/login.defs file does contain account creation configuration directives, you cannot display it with the useradd -D command. Therefore, option D is also an incorrect choice.

Which field contains the same data for both an /etc/passwd and an /etc/shadow file record? A. Password B. Account expiration date C. UID D. GID E. User account's username

E. User account's username The user account's username is the only field within an /etc/passwd and an /etc/shadow record that contains the same data. Therefore, option E is the correct answer. While both files have a password field, they do not contain the same data. The password can only exist in one of the two files, preferably the /etc/shadow file. Thus, option A is a wrong answer. The account expiration date only exists in the /etc/shadow file, so option B is also a wrong choice. The UID and GID fields only exist in the /etc/passwd file, so options C and D are also incorrect answers.


Conjuntos de estudio relacionados

PRE-ASSESSMENT: ESSENTIAL PRACTICES FOR SUPPORTING DIVERSE LEARNERS

View Set

Lewis Ch 64 Muscular/skel problems

View Set

AP Euro - The Social Impact of the Industrial Revolution

View Set

Microeconomics Final, Chapter 14 - Oligopoly, Econ: Chapter 17 Oligopoly, Oligopoly APecon Chapter 17, Monopoly Quizlet for Ch. 15, Chapter 13 Natural Monopoly, Chapter 15: Monopoly, Chapter 15 Monopoly, Chapter 14: Firms in Competitive Markets, Chap...

View Set

PHARMACOLOGY, TOXICOLOGY & PHARMACOKINETICS (PINK)

View Set

Microeconomics chapter 16 (Rent, Interest, and Profit)

View Set

INTEGUMENTARY, CIRCULATORY, AND RESPIRATORY SYSTEMS : UNIT 4 TERMS, SELF CHECK/PRACTICE

View Set

Field Training Mission Statements

View Set