WITH SOLUTIONS GRADED A+
✔✔True or false: User ID numbers are linked to usernames in a way that ensures the
mapping is identical on all computers. - ✔✔False
User ID numbers are assigned to usernames in an arbitrary way, so a given username
may have different user ID numbers on different computers.
✔✔True or false: Symbolic links always have permissions of lrwxrwxrwx. - ✔✔True
The leading l identifies the file as a symbolic link. The remaining characters indicate that
all users have full access to the link file, but the linked-to file's permissions are what
control what users can actually do with the file.
✔✔Default permissions are determined by the _____. - ✔✔umask
✔✔You've created a script, sensitive, and you want to be sure that no other ordinary
user of the computer can read, write, or execute it, but you must be able to read, write,
and execute it. To do so, you type chmod ______ sensitive. (Specify the octal mode.) -
✔✔Answer: 700
✔✔What does the permission string -rwxrwx--- mean? - ✔✔C
Option C correctly summarizes the meaning of the specified permission string. The
description in option A would be represented by -rwx------, which is not the string shown
in the question. Option B would be correct if the string began with d, indicating a
directory; but the leading - indicates a data file rather than a directory. Option D's
description would require rwx in the last three characters of the permission string; but
the --- indicates no world access. Option E combines the directory error of option B with
the world-access error of option D, and so is incorrect.
✔✔A file has a symbolic mode of -rw-r-----. The file's octal mode is _______. -
✔✔Answer: 640
✔✔The command _______ :users somefile.txt changes the group affiliation of
somefile.txt to users. - ✔✔Answer: chown
✔✔Which of the following programs enable root to set the ownership of files? (Select all
that apply.) - ✔✔Answer: B, D
command updates a file's time stamps, but does not change its ownership, so option E
is incorrect.touch command can change various account features, but not file
ownership, so option C is incorrect. The usermod command enables changing the mode
,(permissions) of files, but not their ownership, so option A is incorrect. The chmod, it
enables you to change the ownership of files, so option D is also correct. The root
command is a text-mode tool for changing the ownership and group association of files,
so option B is correct. Nautilus is a GUI file manager, and when it's run as chownThe
✔✔You type the following command and see the resulting output:
$ ls -l test
-rwxr-xr-x 2 rod users 111 Apr 13 13:48 test
What is the meaning of the digit 2 immediately prior to the username (rod)? - ✔✔C
The number in the specified position represents the number of filenames that point to
the file—in other words, the number of hard links to the file. Thus, option C is correct.
Options A, B, D, and E all present fictitious descriptions of that field's meaning. (The
file's size appears later on the line—it's 111 in this example.)
✔✔Which of the following options to chown changes the ownership of all the
subdirectories of any specified directories, rather than just the files or directories that
are explicitly passed to it? - ✔✔A
The -R or --recursive option does as the question specifies, so option A is correct. The -
-tree, -all, and -t options are all fictitious, so options B, D, and E are all incorrect. Option
C is almost correct, but the correct option includes two dashes, not one—that is, it's --
recursive, not -recursive.
✔✔The character that separates fields on each line of /etc/passwd is ___. - ✔✔Answer:
:
✔✔True or false: Users should be logged in when you change their UID numbers with
usermod. - ✔✔False
If a user is logged in when you change the user's UID number, problems can ensue
because the login session will continue to use the old UID number. Thus, users should
be logged out before you attempt to change their UID numbers.
✔✔What option can you pass to groupadd to have it create a group with a GID number
of 1027? - ✔✔E
You can use the --gid (or -g) option to groupadd to specify the GID number for a new
group, so option E is correct. Options A, B, C, and D all present fictitious options to
groupadd.
, ✔✔You can type ______ to acquire root privileges that persist across multiple
commands. - ✔✔su
✔✔You can type useradd ____ nemo as root to create the nemo account without
creating a home directory for nemo. - ✔✔Answer: -M
✔✔The user arnold is currently logged in. Despite this fact, you want to delete his
account without first logging him off. You don't want to delete arnold's files. To
accomplish this goal, you type userdel ___ arnold. - ✔✔Answer: -f or --force
✔✔You can type _____ to learn your current username and nothing more? -
✔✔Answer: whoami
✔✔True or false: By default, useradd copies a set of user configuration files from
/etc/skel when creating a new user account. - ✔✔True
Default user configuration files give users a head start on configuring their accounts and
enable system administrators to set user default options. They're copied from /etc/skel
unless you specify another location with the --skel (-k) option to useradd.
✔✔True or false: The /etc/group file supports linking each user to a maximum of one
group. - ✔✔False
The question's limitation applies to the default group specified in /etc/passwd. In
/etc/group, each line can link one group to an arbitrary number of users.
✔✔When should you use the root account? - ✔✔E
The root account is extremely powerful, and therefore extremely dangerous. Thus, you
should use it only when you need that power to perform administrative tasks, as option
E specifies. You'll get little or no extra speed from the root account, so using it as option
A specifies will gain you nothing but expose your system to added risk, making option A
incorrect. Even if you're the sole user of the computer, using root unnecessarily can be
dangerous; and if you're the system administrator, you'll have to use the root account
even on a multi-user system. Thus, option B is incorrect. Although root power is
sometimes necessary for diagnostics, this isn't always the case, so option C is incorrect.
Running untrusted programs is always risky, and running them as root is doubly risky,
so option D is incorrect.
✔✔You want to delete the oldproj group, so you type ______ oldproj. - ✔✔Answer:
groupdel
✔✔True or false: GUI account management tools provide more options than their text-
mode counterparts. - ✔✔False