Courseiva
Administrative TasksmediumMultiple ChoiceObjective-mapped

LPIC-1 Administrative Tasks Practice Question

A Linux administrator is responsible for a server that runs a critical database application. The server uses SysV init and the current runlevel is 3. The administrator needs to schedule a maintenance window for next Sunday at 2:00 AM to apply security patches that require a reboot. The administrator wants to ensure that after the reboot, the system returns to runlevel 3 and the database service (db_service) starts automatically. The administrator also wants to log the maintenance actions to /var/log/maintenance.log. Which of the following is the BEST approach to accomplish these tasks?

⚠ Common exam trap

The trap is that candidates may assume option B is correct because it uses proper SysV init configuration (inittab and init scripts), but they overlook that 'shutdown -r 02:00' cannot schedule for a specific day like 'next Sunday', and that configuring syslog for custom logging is not straightforward. Option A, while using rc.local (a less standard method), provides direct scheduling via 'at' and simple output redirection.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Edit /etc/rc.d/rc.local to start db_service and set runlevel via 'init 3' in the script. Then use 'at 2am Sunday shutdown -r now' to schedule reboot and redirect output to /var/log/maintenance.log.

The best approach because it uses 'at' to schedule the reboot, which can be configured to run at a specific day and time (e.g., 'at 2am Sunday shutdown -r now'), and redirects output to /var/log/maintenance.log for simple logging. Although editing rc.local is not the standard SysV method for persistent service management, it effectively starts the database service and sets the runlevel to 3 upon boot. In contrast, option B's shutdown command does not allow specifying the day 'next Sunday', and configuring syslog for a custom log file is non-trivial. Options C and D are incorrect due to systemd usage or lack of scheduling.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Edit /etc/rc.d/rc.local to start db_service and set runlevel via 'init 3' in the script. Then use 'at 2am Sunday shutdown -r now' to schedule reboot and redirect output to /var/log/maintenance.log.

    Why this is correct

    rc.local runs after boot, but setting runlevel via 'init 3' in rc.local is redundant and may cause issues. 'shutdown -r now' reboots immediately, not at 2:00.

  • Edit /etc/inittab to change the initdefault line to 'id:3:initdefault:' and create an init script for db_service with appropriate symlinks in /etc/rc.d/rc3.d/. Schedule the reboot using 'shutdown -r 02:00' and configure syslog to capture messages to /var/log/maintenance.log.

    Why it's wrong here

    This correctly sets default runlevel, ensures service starts, schedules reboot, and logs actions via syslog.

  • Use 'systemctl set-default runlevel3.target' and 'systemctl enable db_service' then schedule reboot with 'shutdown -r 02:00' and log with 'logger' to /var/log/maintenance.log.

    Why it's wrong here

    systemctl commands are for systemd, not SysV init. The server uses SysV init.

  • Use 'telinit 3' and 'service db_service start' then run 'reboot' at 2:00 AM. Log actions by appending to /var/log/maintenance.log manually.

    Why it's wrong here

    telinit 3 changes runlevel immediately, not at scheduled time. Also, manual logging is not automated.

About these practice questions

One of 527 original LPIC-1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-1 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-1 exam.