Title: LPIC 102 Q/A / 07 Administrative Tasks

Q: You need to enable the web server (running as the www-data user and group) to write into a directory called /home/webfiles. Which commands will accomplish this task in the most secure manner?
chgrp www-data /home/webfiles ; chmod 775 /home/webfiles
chmod 777 /home/webfiles
chgrp www-data /home/webfiles ; chmod 711 /home/webfiles
chmod 707 /home/webfiles
A: A. The best option among these choices is to change the group to www-data and change the permissions such that the group can write into the directory. Option B should never be used because it enables world-writing to the directory. The other options will not allow the web server group to write into the directory.

Q: Which of the following will execute a job through cron at 12:15 a.m. and 12:15 p.m. every day?
0,12 15 * * *
15 0,12 * * *
15 * * * 0/12
*/12 * * * 15
A: B. The format for cron is [minute hour day-of-month month-of-year day-of-week], thereby making option B the correct option for this question.

Q: Which file is used to indicate the local time zone on a Linux server?
/etc/timez
/etc/timezoneconfig
/etc/localtime
/etc/localtz
A: C. The /etc/localtime file, which can be an actual file or a symbolic link, is used to indicate the local time zone. The other files listed as options do not exist.

Q: When importing entries into the LDAP database using ldapadd -f , in which format should the file be?
LDAP
TXT
CSV
LDIF
A: D. The LDAP Data Interchange Format (LDIF) is an open format, defined in Request for Comments (RFC) 2849, that enables import and export of LDAP entries. The file formats TXT and CSV are valid but not for the purpose described; there is no specific file format known as LDAP.

Q: Which of the following commands removes an expiration from an account?
sudo chage -l username
sudo chage -E -1 username
sudo chage -E now username
sudo chage --noexpire username
A: B. The chage command will be used for this purpose, specifically with the -E option. When provided with a date, chage will expire the account on that date. When provided with -1, the expiration will be removed.

Q: Within which directory will you find files related to the time zone for various regions?
/etc/timezoneinfo
/etc/zoneinfo
/var/zoneinfo
/usr/share/zoneinfo
A: D. Within the /usr/share/zoneinfo hierarchy, you will find information on the various regions and time zones available. The files within this hierarchy can be symlinked to /etc/localtime. The file /etc/timezone is also sometimes used by Linux systems and, notably, by Java in certain situations.

Q: Which of the following commands schedules a series of commands to execute 1 hour from now?
atq +1hr
at now + 1 hour
atq
at -1
A: B. The at command is used to run a series of commands that you enter. Unlike with cron, you can schedule commands from the command line to be executed in the same order entered rather than having to create a specific script for the commands. The syntax shown in option B sets the time to be one hour from now.

Q: You need to delete a user from the system, including their home directory. Which of the following commands accomplishes this task?
userdel
userdel -r
userdel -R
deluser
A: B. The userdel command is used for this purpose, and the -r option (lowercase) deletes both the home directory and mail spool files. The -R (uppercase) option tells the userdel command to use a chroot directory.

Q: Which file contains a list of usernames, UIDs, and encrypted passwords?
/etc/passwd
/etc/shadow
/etc/encpass
/etc/grouppass
A: B. The /etc/shadow file contains usernames, UIDs, and encrypted passwords and is not readable by any non-root user on the system due to the sensitive nature of the encrypted passwords. The /etc/passwd file contains usernames and UIDs but not encrypted passwords. The other two files listed for this question do not exist.

Q: Which job scheduler should you use if the computer on which you need to schedule the job is powered down at various times?
cron.d
cron.hourly
anacron
at
A: C. Use anacron when you need to schedule a job on a computer that might be off when the job is scheduled. anacron will take care of running the job at its next available time.

Q: Which of the following commands provides the current date and time in a format of seconds since the epoch?
date +%seconds
date +%s
date --seconds
date --now
A: B. The +%s option will format the date as seconds since January 1, 1970. This option is used frequently in scripting and elsewhere for obtaining a unique time stamp that can be parsed easily as an integer. The other options will not work.

Q: Which option to the iconv command shows the available character sets on a given system?
--showchar
--show
--list
--all
A: C. The --list option shows the available character sets on the system. The other options given for this question do not exist.

Q: Which environment variable controls the format of dates and times, such as a 12-hour or 24-hour formatted clock?
LOCALE_DATE
DATE_FORMAT
LC_TIME
LC_DATE
A: C. The LC_TIME environment variable is used to control the display and behavior of the date and time and can be changed to a different locale in order to achieve the desired display and behavior of date and time formatting. The other options shown for this question do not exist.

Q: Which command is recommended for configuration of slapd for OpenLDAP versions 2.3 and later?
slapd-conf
config-slapd
openldap-config
slapd-config
A: D. Beginning with OpenLDAP version 2.3, slapd-config is used for configuration of OpenLDAP, as documented at http://www.openldap.org/doc/admin24/slapdconf2 .html. The other commands are not valid.

Q: Which shortcut within cron enables running of a task every day at midnight?
@daily
@daybegin
@topday
@beginday
A: A. The @daily shortcut schedules a job to run at midnight every day. The other options shown do not exist.

Q: Which of the following encoding provides a multibyte representation of characters?
ISO-8859
UTF-8
ISO-L
UFTMulti
A: B. UTF-8 provides multibyte character encoding and is generally accepted as the standard for encoding moving forward. ISO-8859 is single byte encoded. The other options are not valid.

Q: Which of the following commands changes a group called DomainAdmins to DomainUsers?
groupmod -n DomainAdmins DomainUsers
groupchg DomainAdmins DomainUsers
chgroup DomainAdmins DomainUsers
group -N DomainAdmins DomainUsers
A: A. The groupmod command will be used for this purpose, and the -n option is used to change the group name. The other commands listed do not exist.

Q: Which file stores group information on a Linux server?
/etc/groupinfo
/etc/groups
/etc/roles
/etc/group
A: D. The /etc/group file contains information on groups on a Linux system. The other files are not valid for the purpose described.

Q: Which command can be used to create an LDIF file from the current LDAP database?
slapdump
ldapdump
slapcat
catldap
A: C. The slapcat command dumps the slapd database in LDIF format to STDOUT. The output can then be redirected into a file. The other commands are not valid.

Q: You are looking for a scheduled job that is not found in /etc/crontab, through systemd timers, or within /var/spool/cron. What is another location in which the scheduled job might be stored?
/etc/crontabs
/etc/cron.conf
/etc/cron.d/
/etc/sked
A: C. The /etc/cron.d/ directory can contain scripts that have scheduling information within them along with jobs to run. The other locations given as options are not valid.

Q: You need to determine if LDAP integration is working correctly. In order to do so, you would like to obtain a list of users, as read by /etc/nsswitch.conf. Which command can be used for this purpose?
getuser
getent
usermod
userlist
A: B. The getent command is used to display entries based on the /etc/nsswitch.conf file. One use case for getent is when integrating with Microsoft Active Directory or another LDAP service to check if the connection can be made to the LDAP server. The usermod command is valid but is not used for this purpose, and the other commands shown for this question are not valid.

Q: What is the name of the configuration file that contains information about group and user addition, such as the maximum and minimum user and group IDs, to be used when adding users and groups?
/etc/groupinfo
/etc/login.defs
/etc/login.info
/etc/loginlist
A: B. The /etc/login.defs file contains various configuration items such as the minimum and maximum user and group IDs to be used on the system.

Q: Which environment variable is used for localization related to measurement units such as metric?
LC_METRIC
LC_MEASURE
LC_MEASUREMENT
LC_MEASUREUNITS
A: C. The LC_MEASUREMENT environment variable is used to indicate the measurement units that should be used.

Q: Which of the following lines added to .profile in a user’s home directory will set their time zone to Central time?
TZ=/Central ; export TZ
TIMEZONE='America/Chicago' ; export TIMEZONE
set TZ=/Central
TZ='America/Chicago'; export TZ
A: D. The TZ environment variable is used for this purpose and the general format is as shown, making option D the correct answer.

Q: Within which directory will you find scripts that are scheduled to run through cron every 24 hours?
/etc/cron.daily
/etc/cron.weekly
/etc/cron.hourly24
/etc/crontab
A: A. The /etc/cron.daily directory contains files such as scripts that are executed daily. There are corresponding cron.hourly, cron.weekly, and cron.monthly directories that run on their respective schedules, as indicated by the name of the directory.

Q: Which of the following values for the LANG variable will configure the system to bypass locale translations where possible?
LANG=COMPAT
LANG=NONE
LANG=C
LANG=END
A: C. Setting LANG=C is an alias for Portable Operating System Interface (POSIX) compatibility and will cause programs to bypass locale translations. The other options shown for LANG are not valid.

Q: When running useradd, which option needs to be specified in order for the user’s home directory to be created?
-h
-m
-x
-a
A: B. The -m option causes the user’s home directory to be created. By default, if this option isn’t specified and CREATE_HOME has not been set, the home directory won’t be created. The –h option displays help text, and the other options shown are not valid.

Q: Which of the following commands locks out password-based login for a user but does not prevent other forms of login?
usermod -L
userdel -r
useradd -h
userlock
A: A. The usermod -L command locks an account by placing a ! in the encrypted password. If the user has another means to log in, such as with an SSH key, using usermod -L will not prevent their login.

Q: If you need to temporarily reconfigure all locale variables and settings for a given session, which environment variable can be used?
LC_LIST
LC_GLOBAL
LC_ALL
ALL_LOCALE
A: C. The LC_ALL variable can be used to set environment variables to the current locale and will override others. This can be used when there is a need for a temporary change. The other variables listed here are not used for this purpose and are not created by default.

Q: Which of the following will run a command called /usr/local/bin/changehome.sh as the www-data user when placed in /etc/crontab?
1 1 * * * www-data /usr/local/bin/changehome.sh
www-data changehome.sh
*/1 www-data changehome.sh
* * */www-data /usr/local/bin/changehome.sh
A: A. The format when adding a username places the username between the schedule and the command to run, making option A correct. The other options shown for this question are invalid. In the case of option B, there is no schedule. In the case of options C and D, the schedule is incorrectly formatted.

Q: Which of the following commands produces a report listing the last password change date for all users on the system?
passwd -a
passwd -S
passwd -a -S
passwd --all
A: C. The passwd command will be used for this purpose. The -a option displays all users but requires the use of -S to indicate status. The -S option alone will not produce a report for all users, and the --all option is an alias for -a.

Q: Assume that passwords must be changed every 60 days. Which command will change the date of the user’s last password change without the user actually changing the account password?
chage -f
chage -W
chage -l
chage -d
A: D. The chage command is used for this purpose. The -d option sets the days since the last password change and is measured in days since January 1, 1970. The -W option is the days of warning for changing a password, and the -l option displays a list of the various settings related to the account.

Q: Which of the following files is used by anacron for reading configuration information related to jobs?
/etc/anacron.d
/etc/anacrontab
/etc/anacron.config
/etc/anacron.conf
A: B. The /etc/anacrontab file contains information about the jobs such as the job name and delay, among other information. The other files listed do not contain anacron-related information about jobs.

Q: Which of the following commands is used to add entries to the OpenLDAP database?
ldapd
adduser
addldap
ldapadd
A: D. The ldapadd command is used to add entries to the OpenLDAP database.

Q: Which file contains a list of users who are not allowed to create cron scheduled tasks?
/etc/cron.users
/etc/cron.deny
/etc/cron.denyusers
/etc/cron.userlist
A: B. The /etc/cron.deny file contains a list of users who cannot create cron scheduled tasks. The other files do not exist by default.

Q: You are viewing the /etc/passwd file and see a * where the password should be. What does the presence of a * indicate within the password file?
The system uses forward password aging.
The system uses shadow passwords.
The system has been compromised.
Users have a * for their passwords.
A: B. The system uses shadow passwords if an asterisk shows up in the password field of the /etc/passwd entries. There is no indication that the system has been compromised, making option C incorrect, and there is no password scheme called “forward password aging,” making option A incorrect as well.

Q: Which of the following best describes the relationship between UIDs and GIDs on a Linux system?
The UID and GID are the same across the system for a given user.
Each user has a UID and GID that are the same and are created when the user is created.
The UID represents the user whereas the GID is a globally unique user ID.
There is no direct relationship between UID and GID.
A: D. There is no direct relationship between the UIDs and GIDs on a system. UIDs represent users, whereas GIDs represent group IDs. On some systems, the UID and GID number will match for regular users, but this is not a requirement and is more of a coincidence.

Q: Which of the following commands is used to re-create indexes based on existing slapd databases?
ldapind
ldapindex
slapindex
indexldap
A: C. The slapindex command generates indexes based on slapd databases. The other commands are not valid.

Q: Which command is used to change a user’s home directory to /srv/data/username and move the contents at the same time?
usermod -md /srv/data/username
homedir -m /srv/data/username
userex -m /srv/data/username
userchg /m /srv/data/username -d
A: A. The usermod command is used for this purpose. The -d option changes the home directory, whereas -m moves the contents. The other commands shown for this question are not valid.

Q: Which option to useradd will add groups for a user?
-g
-x
-l
-G
A: D. The -G option is a list of supplemental groups to which the user will be added. A lowercase -g option provides the primary GID. The -l option causes the user to not be added to the lastlog and faillog databases. There is no -x option.

Q: Which command will list the cron entries for a given user as denoted by ?
crontab -l -u
crontab -u
cron -u
cronent -u
A: A. The crontab command can be used for this purpose, and the -l option is used to list the crontab entries. The -u option is needed to specify a user other than the current user.

Q: Which option to useradd creates a system user rather than a normal user?
-r
-s
-a
-S
A: A. The -r option creates a system user that will typically entail no expiration, no home directory, and a UID below 1000. The -s option defines the shell and is not typically used for this purpose. The -a and -S options do not exist.

Q: Which file contains encrypted password information for groups?
/etc/group
/etc/gshadow
/etc/gsecure
/etc/group.conf
A: B. The /etc/gshadow file contains secure information such as an encrypted password for groups, where applicable. The /etc/group file contains general information on groups. The other two files listed as options do not exist.

Q: Which of the following commands can be used to help with recovery of a corrupted OpenLDAP database?
openldap-recover
oreco
slapd-recover
slapd_db_recover
A: D. The slapd_db_recover command can be used to help recover an OpenLDAP database that has become corrupted or otherwise invalid. The remaining options for this question are not valid commands.

Q: Which of the following best describes the use of the groupdel command?
You may force group deletion with the -f option.
If a user’s primary group is to be deleted, that user must be deleted first or have their primary group changed.
groupdel can be run at any time, regardless of group membership.
The -r option for groupdel will recursively change user’s GIDs after group deletion.
A: B. The groupdel command cannot delete groups unless there are no users who have the given group as their primary GID. There is no -f or -r option.

Q: Which of the following commands displays the UID, primary group, and supplemental groups for a given user?
id
getid
passwd
chage
A: A. The id command shows the username, UID, primary group, and GID, along with supplemental groups. The passwd and chage commands are not used for this purpose. There is no getid command.

Q: Which option to the usermod command is used to change a given user’s real name?
-R
-n
-d
-c
A: D. The -c option changes the comment field in /etc/passwd. The comment field is typically associated with the real name of the account. The -R option indicates a chroot directory, whereas -d indicates a change of home directory. There is no -n option.

Q: Assume that you have deleted a user account with UID 1501, including the -r option. Which command should you also run to look for other files that might have been owned by the user?
find -id 1501
grep 1501 *
grep -u 1501 *
find / -uid 1501
A: D. The find command will be used for this purpose. The correct syntax is shown in option D. The group command will merely look in the specified files for the number 1501, and the -u option to grep includes byte offsets, which is not applicable for this question.

Q: On which port does the slapd LDAP daemon listen for connections?
389
3389
3306
110
A: A. The standard port for unencrypted LDAP is 389, and that is the port on which slapd listens for connections. Port 3389 is RDP, whereas 3306 is MySQL. Finally, 110 is POP3.

Q: Which of the following commands will set the systemwide time zone to America/Los_Angeles?
ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
ln -sf America/Los_Angeles ; /etc/localtime
ln -sd /etc/localtime /usr/share/timezone/America/Los_Angeles
ln -sf /etc/localtime /usr/share/zoneinfo/America/Los_Angeles
A: A. The ln command is used for this purpose, and the -s option creates a symbolic link, and -f forces or overwrites the destination. The other options or order of commands are not valid.

Q: Which locale-related variable is used for currency-related localization?
LC_MONE
LC_CURRENCY
LC_MONETARY
LC_CURR
A: C. The LC_MONETARY variable is used by certain programs to determine the localization for currency.

Q: Which option to systemd-run adds a timed event?
--timed
--add-timer
--on-calendar
--on-time
A: C. The --on-calendar option adds a timed event with systemd-run. The other options shown are not valid for use with systemd-run.

Q: Which file is used to provide a list of users who can add and delete cron jobs?
/etc/cron.job
/etc/cron.allow
/etc/cron.users
/etc/crontab
A: B. The /etc/cron.allow file is a list of users who have permission to create and remove their own cron jobs. The /etc/crontab file is used to store cron jobs, and the other files do not exist.

Q: Which debug level for slapd is used to provide debugging of configuration file processing?
1
64
8
0
A: B. Debug level 64 provides configuration processing debug information. Debug level 1 traces function calls, whereas level 8 shows connection management. Debug level 0 is no debug.

Q: Which command deletes an at job with an ID of 3?
atdt
at -l
atrm 3
rmat 3
A: C. The atrm command removes jobs given their IDs. The ID can be obtained with the atq command. The at -l command shown will list jobs but not delete them. The rmat command is not valid.

Q: Which command on a Debian-based system can be used to change the time zone using the package-based tools?
dpkg-reconfigure time
dpkg-reconfigure tzdata
apt-select tzdata
apt-config timezone
A: B. The dpkg-reconfigure command is used to cause the configuration questions to be asked again. The tzdata package is the name of the package on Debian-based systems. The two apt- commands shown are not valid.

Q: What will be logged with the loglevel set to 0x10 in a slapd.conf configuration file?
No debugging
Trace debugging
Stats logging
Packets sent and received
A: D. There are multiple ways to specify loglevels and debugging for slapd, including by keyword, by integer, or as shown in the question, by hex. All of the values shown are valid for loglevel. No debugging is 0, trace is 1, stats logging is 256 or 512 depending on type, and packets sent and received is integer 16, or hex 0x10.

Q: Within which directory should you place files in order for the files to be copied to a user’s home directory when the user is created?
/etc/skel
/etc/homedir
/home/usertemplate
/etc/template
A: A. The /etc/skel directory contains files that are automatically copied to a user’s home directory when that user is created. The other directories listed for this question do not exist by default.

Q: Which command displays a list of jobs currently scheduled with at?
atlist
atq
atl
at --jobs
A: B. The atq command shows a list of jobs that have been scheduled with the at command. The other commands don’t exist with the exception of option D, which shows the at command but with an invalid option, --jobs.

Q: On which port does LDAP over SSL listen for connections?
389
443
636
3128
A: C. The port for LDAPS or LDAP over SSL is 636. Port 389 is standard, non-SSL, LDAP. Port 443 is used for HTTPS, and 3128 is used for Squid proxies.

Q: Which scheduler can be used to schedule a command to run once at a certain time?
at
cron
job
jobctl
A: A. The at command runs a command at a specified time. While cron can be used to run a command, it will run the command repeatedly according to the schedule set for the command. The other commands are not valid.

Q: Which file provides a list of users who are allowed to create at jobs?
/etc/at.users
/etc/at.scheduler
/etc/at.conf
/etc/at.allow
A: D. The /etc/at.allow file is used to specify users who can create at jobs. The other files are not valid.

Q: Which file extension is used for systemd timer units?
.conf
.timer
.timerd
.timeevent
A: B. Systemd timer files have the extension .timer and are used for scheduling service unit files or events. The other file extensions are not used for systemd timer units.

Q: Within which directory would you find a list of files corresponding to the users who have current cron jobs on the system?
/var/spool/cron/crontabs
/var/spool/jobs
/etc/cron
/etc/cron.users
A: A. The /var/spool/cron/crontabs directory contains a file for each user who currently has one or more cron jobs or entries. Note that the other files listed here are not valid for this purpose.

Q: When using slapadd for a large import, an error occurs at roughly 90 percent completion. Which option to slapadd enables specification of a line number from which the import will be restarted?
-l
-f
-q
-j
A: D. The -j option enables specification of a line from which the import will be started. It is useful in the scenario described where the import needs to be restarted due to error. The -f option specifies an alternate location for the slapd configuration file. The -q option is quick mode, with less checking, and -l specifies the input file.

Q: Which argument to the locale command displays currently available locales for a given system?
-c
-a
-p
-s
A: B. The -a option shows all locales currently available on a system. The other options do not produce the output specified in this scenario.

Q: Which option to timedatectl sets the system clock?
--adjust-system-clock
-s
-c
-a
A: A. The --adjust-system-clock option sets the system clock when used with set-local-rtc. The other options are not valid.

Q: Which option to the file command displays information on the MIME type of the file being interrogated?
-i
-m
-l
-a
A: A. The -i option displays information that can help determine the character set such as ISO-8859, ASCII, or Unicode for the given file. The -m option specifies a list of magic files, -l shows a list of patterns, and -a is not a valid option with the file command.

Q: Which environment variable is used to set the paper size?
LC_PAPERSIZE
LC_PAPER
LC_PRINTERQ
LC_PRINTSIZE
A: B. The LC_PAPER variable is used to set the paper size for printing. The other variables are not available by default.

Q: Which of the following is used as a systemwide cron file?
/etc/cron.d
/etc/cron.sys
/etc/crontab
/etc/cron.tab
A: C. The /etc/crontab file is a plain-text file that is treated as a systemwide cron file. As such, the file is generally not associated with any single user and it’s not necessary to run a special command after editing this file.

Q: Which command can be used to view the available timezones on a system and obtain output that can be used in scripts for setting the time zone?
tzd
/etc/locale
tzdata
tzselect
A: D. The tzselect command will, by default, display a step-by-step menu to select a time zone. The eventual output will include a region/time zone line, such as America/Chicago, as output.

Q: Which option within a systemd timer unit will start a timer 90 minutes after boot?
OnBootSec=90min
OnBoot=90min
OnBootHour=1.5
StartOnBoot=90min
A: A. The OnBootSec option is used for this scenario and option A has the correct syntax. The other options shown do not exist.

Q: Which abbreviation is another name for information like the user’s full name, telephone number, and other contact information found in /etc/passwd?
USERINFO
GECOS
HOMEINFO
CDATA
A: B. GECOS is the legacy name for information stored in /etc/passwd such as full name and other contact information.

Q: Which option to the groupadd command specifies the GID for the group?
-g
-a
-h
-k
A: A. The -g option sets the group ID for the newly created group. The -h option is help, and neither -k nor -a exists as an option for groupadd.

Q: When working with systemd timer units, which option to systemctl displays the active timers?
list-timerunits
show-timers
list-timers
list-activetimers
A: C. The list-timers option shows the currently active timers with systemd. The other options are not valid.

Q: Which shortcut to the OnCalendar systemd timer function indicates that the timer unit should run once a week?
OnceAWeek
weekly
everyweek
oneperweek
A: B. The weekly shortcut means that systemd will execute the event once a week. The other shortcuts given as options are not valid.

Q: Which option to the crontab command removes the current crontab?
-r
-l
-g
-f
A: A. The -r option removes the current crontab. The -i option can be added so that the user is prompted prior to removal.

Q: Which variable in /etc/default/useradd controls the location of the skeleton home directory?
SKELETON
SKEL
SKELDIR
SKELLOC
A: B. The SKEL variable controls the location of the skeleton home directory, which is normally /etc/skel/ by default. The other options shown are not used for the purpose described.

Q: Which option to getent enumerates the password database for a given system?
password
listpass
passwd
showpassdb
A: C. The passwd option is used to list the password database on a system. The other options do not exist.

Q: Which directory contains the jobs scheduled with at?
/var/spool/cron/atjobs
/var/spool/at
/var/spool/cron/at
/var/spool/atjobs
A: A. The directory /var/spool/cron/atjobs contains the jobs. The other directories shown do not exist.

Q: Which variable in /etc/login.defs controls the minimum group ID to use on the system?
GIDMIN
GROUPID_MIN
GID_MIN
MIN_GID
A: C. The GID_MIN variable contains the minimum GID to use on the system. The other variables are not used for the purpose described.

Q: Which variable in /etc/login.defs contains the location of a user’s email directory for use by programs such as userdel?
EMAILDIR
DIR_EMAIL
MAILDIR
MAIL_DIR
A: D. The MAIL_DIR variable contains the directory where a user’s mail spool is located. The other options shown are not valid variables for this purpose.

Q: Which file contains user information such as username and real name and is readable by all users of the system?
/etc/pass
/etc/shadow
/etc/passwd
/etc/userinfo
A: C. The /etc/passwd file contains various information about users on a system such as username and real name, along with user ID (UID) and login shell. The file is world-readable.

Q: Which shortcut can be used to indicate that a cron job should be executed on restart?
@restart
@startup
@reboot
@onboot
A: C. The @reboot shortcut indicates that the cron job will be executed when the system starts up.

Q: Which option to groupadd specifies that the group will be a system group?
-r
-m
-j
-b
A: A. The -r option specifies that the group being added will be a system group.

Q: Within which directory are databases stored for OpenLDAP?
/var/lib/ldap
/var/cache/openldap
/var/share/ldap
/usr/share/openldap
A: A. The directory /var/lib/ldap stores database files related to the OpenLDAP deployment on a given server. The other directories shown are not valid for this purpose.

Q: When listing systemd timer units, which option to list-timers shows both active and inactive units?
--all
--active-and-inactive
--inactive
All are shown by default.
A: A. Only active units are shown by default, so the --all option displays all units.

Q: Which file provides a list of users who are not allowed to create at jobs?
/etc/at.allow
/etc/at.deny
/etc/at.denyusers
/etc/at.conf.deny
A: B. The /etc/at.deny file contains a list of users who cannot create at jobs.