nerdexam
CompTIA

LX0-104 · Question #282

Which of the following entries can an administrator add to syslog.conf file to have all syslog messages generated by the administrator system go file to have all syslog messages generated by the admin

The correct answer is A. *.* /dev/tty12. To direct all syslog messages to virtual console 12, an administrator must add an entry . /dev/tty12 to the syslog.conf file.

Essential System Services

Question

Which of the following entries can an administrator add to syslog.conf file to have all syslog messages generated by the administrator system go file to have all syslog messages generated by the administrator? system go to virtual console 12?

Options

  • A. /dev/tty12
  • B/var/log/messages | /dev/tty12
  • C| /dev/tty12
  • Dsyslog tty12
  • Email.* /dev/tty12

How the community answered

(33 responses)
  • A
    70% (23)
  • B
    9% (3)
  • C
    15% (5)
  • D
    3% (1)
  • E
    3% (1)

Why each option

To direct all syslog messages to virtual console 12, an administrator must add an entry `*.* /dev/tty12` to the `syslog.conf` file.

A*.* /dev/tty12Correct

In `syslog.conf`, the format `facility.priority` specifies which messages to match, and `action` specifies where to send them. `*.*` matches all facilities and all priorities (i.e., all messages), and `/dev/tty12` directs these messages to the twelfth virtual console.

B/var/log/messages | /dev/tty12

This syntax is incorrect for `syslog.conf`; `/var/log/messages` is a destination, not a selector, and the pipe symbol `|` is not used in this context to redirect to a console.

C| /dev/tty12

This entry lacks the required `facility.priority` selector, making it syntactically incomplete and therefore incorrect for syslog configuration.

Dsyslog tty12

This is not valid `syslog.conf` syntax; `syslog` is not a valid selector in this form, and `tty12` is incomplete as a destination.

Email.* /dev/tty12

`mail.*` would only direct messages from the mail facility to `/dev/tty12`, not 'all syslog messages' as requested by the question.

Concept tested: syslog.conf configuration and message routing

Source: https://man7.org/linux/man-pages/man5/syslog.conf.5.html

Topics

#syslog#logging#console output#configuration files

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice