LPI Linux Essentials 010 V1.6 - Chapter 13 Quiz

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

You want to change the username of a user from carol to marvel without altering any- thing else about the account. To do so, you would type _________________. A. useradd -l marvel carol B. usermod -l marvel carol C. useradd -l carol marvel D. usermod -l carol marvel E. useradd--login carol marvel

B. In order to modify a user account with the username of carol to a username of marvel, you must issue the usermod -l marvel carol command using super user privileges.

Of the following, which is the best password? A. LinusTorvalds B. uB2op%4q++7K9_z5A++ C. 123456 D. password E.peanutbuttersandwich

B. The password in option B uses a combination of upper- and lowercase letters, numbers, and symbols, and it doesn't contain any obvious word. Furthermore, it's a long password. All of these characteristics make it unlikely to appear in an intruder's password dictionary and make it hard to guess. Thus, option B represents a good password, and the best of those shown. Option A is the name of a well-known celebrity (at least in the Linux world!); such a name is likely to appear in password-cracking dictionaries, and so makes a poor password choice. Option C is an extremely common password, which makes it a bad choice. Furthermore, it's short and it consists of just one symbol type (digits). Option D is another popular (and therefore very poor) password. It's a single common word in all lowercase and it contains no numbers or other nonalphabetic symbols. Although option E is fairly long, it consists entirely of lowercase letters, and its three related words, making it a poor password too.

Information on various groups, such as group name, GID, and group members, is stored in the ___________________ file. A. /etc/passwd B. /etc/shadow C. /etc/group D. /etc/groups E. /etc/GID

C. The /etc/group file contains group data such as the group's name, associated GID, and a list of group members.

What would a Linux system administrator type to remove the nemo account and its home directory? A. userdel nemo B. userdel -f nemo C. userdel -r nemo D. rm /home/nemo E. rm -r /home/nemo

C. The userdel command deletes an account, and the -r switch to userdel causes it to delete the user's home directory and mail spool, thus satisfying the terms of the question. Option A deletes the account but leaves the user's home directory intact. Option B does the same; the -f option forces account deletion and file removal under some circumstances, but it's only meaningful when -r is also used. Option D's command will probably have no effect, since rm works on directories only in conjunction with -r, and /home/nemo is probably the user's home directory. Option E's rm command deletes the user's home directory (assuming it's located in the conventional place, given the username) but doesn't delete the user's account.

You want to create an account for a new user, using the username thor and giving the user a UID of 2019. The command to do this is useradd __________________. A. -uid 2019 thor B. -g 2019 thor C. +uid 2019 thor D. -u 2019 thor E. 2019 -u thor

D. The useradd command with -u 2019 thor will create a new user account, with the username thor and give it a UID of 2019.

To create a system group, you must pass the ______________ option to groupadd. A. -system B. -s C. --sys D. --r E. -r

E. The -r option used with the groupadd command will allow you to create a system group (as long as you have super user privileges).

True or false: Command-line users should normally use usermod to change their passwords.

False. The usual command-line command for changing passwords is passwd.

True or false: After deleting an account, files formerly owned by the deleted account may remain on the computer.

True. Although the userdel command's -r option deletes the user's home directory and mail files, this command doesn't track down the user's files stored in more exotic locations. You can use find to locate such files if you want to delete them or transfer ownership to another user.

True or false: User accounts have higher UID numbers than do system accounts.

True. System accounts have UID values between 0 and some number (normally 499 or 999), whereas user accounts have UID values above that number (starting at 500 or 1,000, typically).

Describe the effect of the following command, assuming that it completes successfully: # groupadd henry A. It creates a new group called henry. B. It adds the user henry to the current default group. C. It imports group information from the file called henry. D. It changes the user's default group to henry. E. It adds the group henry to the user's list of groups.

A. The groupadd command creates a new group, as described in option A, so that option is correct. To add a user to a group, as suggested by option B, you would use the usermod utility. No standard command imports group information from a file, as option C suggests, so this option is incorrect. (Some network user management tools do provide such functionality, though.) To change a user's default group or list of supplemental groups, you would use usermod, so options D and E are both incorrect.


Ensembles d'études connexes

MCAT - Behavioral Science Master Set

View Set

Chapitre 1: La structure de base de la comptabilité

View Set