Apply updated mail aliases with newaliases, write
and verify an incident note in journald using
systemd-cat, clear a stuck CUPS job, submit a test
print, and perform a controlled time change for a maintenance
window. Finish by confirming system time state with
timedatectl and pulling recent kernel messages from
journalctl -k.
You updated /etc/aliases and must apply it. You
also need to log evidence into journald, clear a stuck print
job, submit a test print, and adjust system time for a
maintenance window.
Treat this like a short incident checklist: apply changes, record what you did in logs, validate services with real evidence, and confirm time signals before you leave the box.
newaliases.systemd-cat and verify it by tag.
date -s and verify with
timedatectl.
journalctl -k.
newaliases
before mail services use them.
systemd-cat
and retrieval with
journalctl -t
.
lpstat
and job cancellation using
cancel
.
lp
and confirming queue acceptance.
date -s
and confirmation of system time state with
timedatectl
.
journalctl -k
during incident review.
sudo newaliases
Postfix reads a compiled alias database. After editing
/etc/aliases, you must rebuild it.
/etc/aliases: 86 aliases, longest 52 bytes, 948 bytes total
echo 'aliases rebuilt and printing/time checks in progress' | systemd-cat -t lab142
systemd-cat
writes directly into the journal. Using a consistent tag
makes the note easy to find.
journalctl -t lab142 -n 3
Confirm the entry exists so your evidence trail is complete before moving on.
Jan 25 07:19:02 lab142 lab142[1822]: aliases rebuilt and printing/time checks in progress
lpstat -o
Identify the job name you need to cancel. This is the fastest “what is stuck” view for CUPS queues.
Office_Printer-31 lab 1024 Sun 25 Jan 2026 07:16:55 AM EST
cancel Office_Printer-31
This removes the pending job so the queue can proceed normally.
lp /etc/hosts
Use a real file so the test mirrors actual printing behavior and permissions.
request id is Office_Printer-32 (1 file(s))
lpstat -o
You want a clean signal that the queue is accepting jobs after cleanup.
Office_Printer-32 lab 1024 Sun 25 Jan 2026 07:19:31 AM EST
sudo date -s '2026-01-25 07:25:00'
This is a controlled time change. In production you usually avoid manual time edits while NTP is active, but the lab focuses on command accuracy and verification.
Sun Jan 25 07:25:00 EST 2026
timedatectl
Confirm the local time, time zone, and synchronization state after the change.
Time zone: America/New_York (EST, -0500)
System clock synchronized: yes
NTP service: active
journalctl -k -n 5
Kernel logs provide context during service issues and audits. Grabbing the last few kernel lines is a strong incident habit.
Jan 25 06:58:31 lab142 kernel: e1000e 0000:00:03.0 eth0: Link is Up 1000 Mbps Full Duplex
Jan 25 07:18:09 lab142 kernel: audit: type=1100 audit(...): ... unit=cups comm="systemd"
/etc/aliases
changes are not active until you run
newaliases
. Rebuild the database and retry.
The job may have completed or the job ID was mistyped. Re-run
lpstat -o
and copy the exact job name.
Queue acceptance is only one signal. In real work you would also check printer state and CUPS logs if jobs stall.
If NTP is active, time may be corrected shortly after a manual change. Use
timedatectl
to confirm sync state and current time signals.
If you changed system time only for the lab, return the host to normal time-sync behavior and leave the print queue clean.
timedatectl status
lpstat -o || true
journalctl -t lab142 -n 3
newaliases
: Rebuilds the aliases database used by mail services.
systemd-cat -t <tag>
: Writes a tagged message into journald.
-t <tag>: Sets the SYSLOG_IDENTIFIER tag.journalctl -t <tag>
: Queries journal entries by tag.
-t <tag>: Filters by SYSLOG_IDENTIFIER.-n <n>: Shows the last n lines.lpstat -o
: Shows queued print jobs.
-o: Output jobs in the print queue.cancel <jobid>
: Cancels a specific print job by ID.
lp <file>
: Submits a print job for a file.
date -s 'YYYY-MM-DD HH:MM:SS'
: Manually sets the system time.
-s: Sets time described by the provided string.timedatectl
: Displays time, timezone, and NTP synchronization state.
status: Shows detailed time status (optional subcommand).journalctl -k -n <n>
: Shows the last n kernel messages.
-k: Limits output to kernel messages.-n <n>: Limits output to the last n entries.