Linux + Ch. 10 Administering Users and Groups

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

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

A. The skeleton directory, /etc/skel, typically contains the user environment files that are copied to the account's home directory when it is created.

8. 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 B C E The passwd, userdel, and chage commands can all manipulate (or remove) an account's /etc/shadow file record data in some way.

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

A B C. The password expiration date, account expiration date, and password are all legitimate fields within a /etc/shadow file record.

15. 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 B E The whoami, who am i and id commands will all display information about the current account that is issuing the commands.

1. Which of the following are fields within a /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 B E. The user account's username, password (though it typically only contains an x), and UID are all legitimate fields within a /etc/password file record.

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

A, E, The username is the only field within a /etc/passwd and /etc/shadow record that contains the same data.

18. 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. C. The usrquota and grpquota are /etc/fstab settings used to enable user and group quotas for a filesystem.

11. Which of the following 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 D. The getent group NCC-1701 and grep NCC-1701 /etc/group commands would both allow you to see the various NCC-1701 group members.

14. 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. C. D. E.

4. 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 passwdg B. cat /etc/passwd C. passwd NUhura D. grep NUhura /etc/passwd E. getent passwd NUhura

B. D. E. Though not very efficient, the cat /etc/passwd command would allow you to view the NUhura account's records within the /etc/passwd file. The grep HUhura /etc/ passwd and getent passwd NUhura commands also would allow you to see the NUhura record.

17. 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 last command by default pulls its data from the /var/log/wtmp file. Therefore, option B is the correct answer.

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

B. The newgrp command will let you switch temporarily from your account's default group to another group with whom you have membership.

19. 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. To quickly remove quota limits on all filesystems, you would use the quotaoff -a command.

6. 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. If the CREATE_HOME directive is not set or it is set to no, then when a user account is created, no home directory will be created by default.

20. 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. The edquota -t command will edit quota grace periods.

10. 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. 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.

16. 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 displays CPU load information for the last 1,5 and 15 minutes as well as data about users who are currently accessing the system.

7. 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. To immediately remove the KSingh account and all his home directory files, using super user privileges, you would use the userdel -r KSingh command.

13. 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 user environment file is run first if it is found in the user account's home directory.

5. 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 useradd -D command allows you to view the account creation configuration directives within the /etc/default/useradd file.


Kaugnay na mga set ng pag-aaral

Levinson's Theories of Life Structure, Life Eras, and Transitions for Men

View Set

Othello Quotes (Act 1) Kim/Kriger

View Set

NURS-316 Exam 2: Lecture 15 (Substance-Related and Addictive Disorders)

View Set

Unit 4: Contracts- The Basics (Quiz)

View Set

level 3 exam 2 psych powerpoint notes

View Set

Chapter 10 - Texas Life and Health

View Set