TESTS Ch8. Essential System Services (Domain 108)

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

Which of the following commands causes sendmail to attempt to deliver the messages in its queue? A. sendmail -q B. sendmail -b C. sendmail -f D. sendmail -v

A. The -q option causes sendmail to attempt to deliver messages from the queue. Add the -v option to display verbose output.

Within which directory will you find the mail queue on a qmail server? A. /var/spool/qmail B. /var/qmail/queue C. /var/spool/mailq D. /var/spool/qmail/queue

B. Qmail directories are contained within /var/qmail by default. The queue directory is /var/qmail/queue. The other directories are not valid on a default configuration of qmail.

When working with klogd, which option can be used to control the file to which messages are logged? A. -d B. -f C. -v D. -l

B. The -f option indicates the file to which messages will be logged. The -d option is used for debugging, while -v prints the version of klogd. There is no -l option for klogd.

Which access control directive in a CUPS configuration file configures the system to accept connections from the local network with addresses from 192.168.1.1 through 192.168.1.127? A. Allow 192.168.1.0/25 B. Allow 192.168.1.0/24 C. Allow 127.0.0.0/8 D. AllowHosts 192.168.1.0

A. The Allow directive is used for this purpose and the addresses 192.168.1.1 through 192.168.1.127 signify a /25 in CIDR notation, thereby making answer A correct. Note that option B, with a /24 netmask would allow the addresses too but would also allow 192.168.1.128 through 192.168.1.255, which is larger than should be allowed.

Which option in a CUPS configuration file causes the daemon to listen on all interfaces on port 631? A. Port 631 B. Listen All:631 C. Listen 127.0.0.1:631 D. Port All:631

A. The Port configuration option is used for this purpose and is used as an alternative to the Listen directive. With the Listen directive you will specify address:port. However, option C, while valid syntactically, will only listen on the localhost IP address of 127.0.0.1 and not all interfaces.

Which option in journald.conf controls the maximum file size for individual journal logs? A. SystemMaxFileSize B. MaxFile C. LogFileSize D. LogSize

A. The SystemMaxFileSize option controls the size of the journal log file to ensure that a log does not cause problems related to disk usage. The SystemMaxUse option controls overall size of journal files and the default for SystemMaxFileSize is 1/8 of the SystemMaxUse setting to allow for rotation of files.

Which command can be executed to view completed print jobs? A. lpstat -q B. lpq C. lpstat -W completed D. lpqueue -c

C. The lpstat command is used for this purpose. The lpstat command displays information about printers, print jobs, and related information. The -W option specifies which jobs to display, completed or not completed. The lpq command shown as an option is used to view the queue, and the other options are not valid.

When running the NTP daemon, which command can you execute to work with the NTP server in an interactive mode? A. ntpd B. ntpdate C. ntpq D. ntp-interactive

C. The ntpq command provides an interactive, menu-like interface into the NTP server. You can use ntpq to check statistics on peers, for example. The ntpdate command shown as option B is used as a command-line means to set the time. The ntpd command shown as option A would execute the NTP daemon itself.

Which of the following commands displays the current mail queue on a Postfix server? A. qmail B. mailqueue C. mail -q D. mailq

D. The mailq command is used on Postfix servers in order to view a summary of the current mail queue. Details of the queue include the ID of the mail being sent along with one or more of the e-mail addresses involved in the transaction. The mailq command may also work with newer versions of sendmail.

Which option within a logrotate configuration file disables compression of the log file? A. compressoff B. limitcompress C. nocompression D. nocompress

D. The nocompress option is used to prevent the log file from being compressed or zipped as part of the rotation process. This might be needed on systems where compression negatively affects performance or where additional processing is necessary.

When configuring a log file for rotation, you need to execute a command to run a script after log file rotation. Which option within the configuration can be used to facilitate this behavior? A. after-rotate B. run-script C. rotatecomplete D. postrotate

D. The postrotate option within a configuration for log rotation can be used for this purpose. After postrotate, a line typically follows with the script or commands to execute. The other options shown for this question are not valid.

You need to delete all of the messages from the queue on a postfix server. Which of the following commands will perform this action? A. postqueue -remove B. rm -rf C. postfix -f D. postsuper -d ALL

D. The postsuper -d command deletes messages from the queue. The ALL keyword causes all messages to be deleted from the queue. You should take care when performing this action because it is irreversible. There is no -remove option to postqueue and the -f option for postfix is not relevant. The rm -rf command shown is not specific enough, and it is generally not recommended to remove files from a mail queue manually.

Which of the following commands sets the hardware clock to UTC based on the current system time? A. hwclock --systohc --utc B. hwclock --systohc --localtime C. hwclock --systohc D. hwclock --systoutc

A. The -systohc will set the hardware clock according to the current system time. The use of -utc is required in order to ensure that the time is set to UTC. If -utc is omitted, the time will default to whatever was used the last time the command was run, which could be UTC but might also be localtime instead. Therefore, the best option is A.

Which function of the hwclock command will set the hardware clock to the current system time? A. -w B. -s C. -a D. -m

A. The -w option sets the hardware clock to the current system time. The -s option does the opposite, setting the system time to the hardware clock. There is no -a or -m function for hwclock.

Which of the following URLs can be used to view a list of completed print jobs in CUPS? A. http://localhost:631/jobs?which_jobs=completed B. http://localhost:631?completed C. http://localhost:631/?completed D. http://cups/jobs=completed

A. The URL shown will display the jobs area of the local CUPS server with a query string name of which_jobs and a value of completed. The other URLs shown are not valid.

When working with syslog-ng, which of the following is the correct path and filename for the primary configuration file? A. /etc/syslog-ng/syslog-ng.conf B. /etc/syslog/syslog-ng.conf C. /etc/syslog-ng/ng.conf D. /etc/syslog-ng/ngd.conf

A. The configuration file for syslog-ng is stored in /etc/syslog-ng and is named syslog-ng.conf. There is typically not an /etc/syslog directory, even on systems without syslog-ng.

Which of the following commands places a file into the print queue? A. lpr B. lpd C. lpq D. lpx

A. The lpr command places a file (or standard input) into the print queue for lpd to work with. The lpq command prints the current queue. There is no lpx command.

Which configuration option in /etc/logrotate.conf will cause the log to be emailed to [email protected] when the logrotation process runs for the selected log? A. mail [email protected] B. sendmail [email protected] C. maillog [email protected] D. logmail [email protected]

A. The mail option is used to send the log to the specified e-mail address on completion of the logrotate process. The other options shown do not exist as options in /etc/logrotate.conf.

Which command should be executed after making a change to the sendmail access database /etc/access? A. makemap B. makedb C. newaccess D. rebuilddb

A. The makemap command is used to create the hashed database in the correct format for sendmail to use. The other commands are not valid for sendmail.

Which of the following commands causes the mail queue to be processed on a Postfix server? A. postqueue -f B. postqueue -D C. postfix -q D. postsuper -q

A. The postqueue -f command is used to flush the queue. The command will process all of the e-mails that are awaiting delivery. The other commands are not valid for this purpose.

What is the name of the systemd service that provides logging facilities? A. systemd-journald B. systemd-loggingd C. systemd-syslog D. systemd-logger

A. The service used for logging on a computer managed by systemd is called systemd-journald. You use journalctl to view logged entries rather than the standard Linux toolset.

Which of the following commands can be used to restart CUPS on a server running systemd? A. systemctl restart cups.service B. systemctl restart cups C. systemctl reboot cups.target D. systemctl restart cups.target

A. The systemctl command is used for controlling services. In this case, restart should be sent to the CUPS service as denoted by the name cups.service.

You are deploying an Exim server and need to work with the firewall to ensure that the proper incoming ports are open. Which protocol and port should you allow inbound for normal SMTP traffic? A. TCP/23 B. TCP/25 C. TCP/110 D. TCP/143

B. SMTP operates on TCP port 25, and if other servers are contacting your SMTP server, then you'll need to listen on this port and allow traffic to it as well. Port 23 is used for Telnet, port 110 is POP3, and port 143 is IMAP, none of which are necessary for SMTP traffic.

Assuming that the $ModLoad imudp configuration option has been set in the configuration for rsyslogd, which of the following additional options is necessary to configure the port on which the server will listen? A. $Port 514 B. $UDPServerRun 514 C. $Listen 514 D. $UDPListen 514

B. The $UDPServerRun option is used for the purpose described. The port on which the server should listen is then provided as the value for this option. The other options shown are not valid configuration items for rsyslogd.

Within /etc/ntp.conf, which of the following configuration lines sets the location of the drift file? A. drift /var/lib/ntp/drift B. driftfile /var/lib/ntp/drift C. drift-file /var/lib/ntp/drift D. driftconfig /var/lib/ntp/drift

B. The driftfile configuration option sets the location of the driftfile for ntpd. The drift file helps to maintain time accuracy. The location shown is the default for Red Hat Enterprise Linux.

Which command can be used to gather and display statistics about mail processed on a server running sendmail? A. mailq B. mailstats C. statmail D. sendmailstats

B. The mailstats command is used for the purpose described. Of the other options, the mailq command will display the current mail queue but not statistics on mail that has been processed. The other two options are not valid commands.

Which command must you run after making a change to email aliases on a server running Postfix? A. service postfix restart B. newaliases C. alias -n D. postfix -e

B. The newaliases command re-creates the aliases database on servers running Postfix, sendmail, and qmail. There is no need to restart the mail server after running newaliases. The alias command shown in option C will create an alias for the command shell but is not related to Postfix.

Which of the following commands will set the date immediately and can be used from the command line in a script? A. ntpd B. ntpdate pool.ntp.org C. settime D. time

B. The ntpdate command provides a command-line interface that immediately changes or sets the time according to the NTP server given as its argument. The ntpd answer provided in option A will run the NTP daemon and would not be appropriate for a script. The other two commands are not valid.

You need to create an email address to accept email for [email protected]. However, you would like to have abuse reports sent to multiple email addresses within your organization. Which of the following will send email destined for the abuse account to [email protected] and [email protected]? A. Create a .forward file in the home directory for the abuse user and forward email accordingly. B. Within /etc/aliases, add this: abuse: [email protected],[email protected]. C. Create a .forward file for root and forward email accordingly. D. Within /etc/aliases, add this: abuse: [email protected]\[email protected].

B. The requirements of multiple e-mail addresses prevent the use of .forward; therefore, it will need to be accomplished in /etc/aliases. The format for multiple email addresses is to separate them with a comma, thereby making option B correct.

A user needs to work with printer-related items. Which of the following commands adds the user (called username in the options) to the appropriate group for this purpose? A. usermod -aG printerusers username B. usermod -aG lpadmin username C. usermod -gA lpadm username D. usermod -a lpadm username

B. The usermod command with the -aG option is used to append a group onto the user's list of groups. In this case, the user needs to be a member of the lpadmin group.

When executing the ntpq command, you receive a message like "read: Connection refused." What would this typically indicate? A. The network is down. B. The NTP daemon is not running. C. The use of NTP is administratively prohibited. D. The current user does not have permission to execute ntpq.

B. Typically, the Connection refused message from an NTP-related command means that the daemon is not running. There is no indication that the ntpq command is querying a different server; therefore, whether the network is up or down is irrelevant. The permission-based options for this answer are not valid based on the error message indicated.

Within which directory will you find configuration files for various logs that are to be rotated with logrotate? A. /etc/logrotate B. /etc/logs C. /etc/logrotate.d D. /var/spool/logrotate

C. Individual configuration files for various log file rotation policies are found in /etc/logrotate.d. This directory is included from the primary configuration file /etc/logrotate.conf.

Which option to the journalctl command will continuously update the display as new log entries are created? A. -tail B. -t C. -f D. -l

C. Just as the tail -f command will continuously update the display as new content is added, so too does the -f option display new entries for journalctl. The -t option shows messages for the given syslog identifier. There is no -tail or -l option.

Which of the following options to the sendmail command will print information about the mail queue? A. -bi B. -queue C. -bp D. -f

C. The -bp option to the sendmail command prints information about the current queue. There are no -queue or -f options that are relevant for this question. The -bi option is used to work with the aliases database.

When running ntpd, the server will not adjust or synchronize if the time is skewed from the NTP server by a significant amount of time. Which option to ntpd disables this and causes the synchronization process to continue even if there is large skew? A. ntpd -noskew B. ntpd -skewcheck=off C. ntpd -g 0 D. ntpd -s 0

C. The -g option specifies the maximum offset or skew that can be adjusted for when synchronizing time. When set to 0, there is no offset check.

A developer has created an application and wants to take advantage of syslog for logging to a custom log file. Which facility should be used for an application such as this? A. syslog B. kern C. local# D. user

C. The application could theoretically use any of the logging facilities, depending on the type of application being developed. However, the requirement to log to a custom log file means that the logs will have a different name and possibly location than the standard logs. Therefore, logging to any of the standard or system-level facilities is not appropriate for this scenario, thereby making one of the local (local0 through local7) facilities appropriate.

Which of the following commands is used to determine the amount of disk space used by systemd journal log files? A. journalctl --disk B. journalctl -du C. journalctl --disk-usage D. journalctl -ls

C. The journalctl command is used for this purpose and the -disk-usage option displays the disk space used by journal log files, which are typically stored in /var/log/journal. Journal-related configuration is found in /etc/systemd/journald.conf.

Which of the following commands is used to examine the systemd journal or log file? A. journallist B. ctlj C. journalctl D. jctl

C. The journalctl command is used to work with the systemd journal. On systemdbased systems, journalctl is a central command for debugging and troubleshooting.

Which system logging facility is used for messages from the kernel? A. syslog B. kernel C. kern D. system

C. The kern facility receives messages from the kernel for logging purposes. Of the other options, syslog is used for logging messages about syslog itself. The other two options shown are not valid syslog facilities.

When viewing the syslog configuration, you notice a minus sign (−) preceding several log files. What is the significance of the − in the configuration? A. The use of − indicates that the log may be rotated any time. B. The use of − indicates that the system can utilize other logging facilities when appropriate. C. The use of − omits the disk sync process for every entry into the log. D. The use of − comments out the line.

C. The use of - indicates that syslog does not need to sync to disk for every log entry. This can greatly improve performance for busy systems but may cause log entries to be lost if the sync process has not been run prior to a system crash or other issue.

Within which directory hierarchy will you find configuration files related to printing with the CUPS printing system? A. /etc/cupsd B. /etc/cups.d C. /etc/CUPS D. /etc/cups

D. Configuration files for CUPS are found in /etc/cups. However, it is also common to manage CUPS through its web interface. The other directories listed are not valid.

What is the default port for the CUPS administrative web interface? A. tcp/53 B. tcp/8080 C. udp/456 D. tcp/631

D. TCP port 631 is used as the administrative interface into CUPS. Visiting an active CUPS server on that port will show the administration website for working with print queues and other configuration items related to CUPS.

Which option to the date command can be used to set the date and time? A. date -f B. date -t C. date --change D. date -s

D. The -s option sets the date and time as specified within the command. If there is another means to set the date automatically, it may override the change. For example, if ntpd is running, that process may alter the date even after it has been set with date -s.

Assume that you want all email for the root user to be sent to [email protected]. Which of the following lines in /etc/aliases will accomplish this task? A. [email protected] -> root B. root -> [email protected] C. root, [email protected] D. root: [email protected]

D. The format is user: destination for the aliases file, thereby making option D correct. The other options are not valid syntax for the aliases file.

Which command is used to query and work with the hardware clock on the system? A. hwc B. ntpdate C. systime D. hwclock

D. The hwclock command is used both to query and set the hardware clock, such as the one maintained by the system firmware or BIOS. The ntpdate command is used to set the local system time, but it is not related to the hardware clock. The other commands are not valid.

Which syslog level is used to provide informational messages? A. kern B. emerg C. debug D. info

D. The info severity level provides information messages for a given facility. Of the options given, emerg is used for emergency messages and not normally used by applications, whereas debug is the highest or most verbose level of logging available through syslog. Configuration for syslog is typically found in syslog.conf or syslogd.conf within the /etc/ hierarchy.

When running from a shell script, which command enables logging to syslog? A. logd B. login C. logit D. logger

D. The logger command is used to send messages to syslog and can be executed in a shell script context in order to take advantage of the robustness of syslog without having to write separate log management into the script.

To what server address can you set an NTP client in order to receive time from a regionally local server? A. 127.0.0.1 B. 192.168.1.100 C. ntp.example.com D. pool.ntp.org

D. ntp.org provides a free service for time synchronization. When you use pool.ntp.org as the target, you will typically receive an NTP server that is geographically close to your location, or at least as close as possible. Setting your address to 127.0.0.1 or 192.168.1.100 will use a local server, but only if that server has an NTP service.


Kaugnay na mga set ng pag-aaral

Chapter 04 - Nursing Licensure and Certification

View Set

TMAS 101 chapter 12 Aromatherapy and Bach Original Flower Remedies

View Set

Chapter 1 review for test - interpersonal communications

View Set

French Revolution K Essential Questions

View Set

mastering assignment chapter respiratory system

View Set

Driver's Education True or False

View Set