Investigate a Service

Linux lab Intermediate 3 tasks 20 points

A service called orders.service is running and logging to the journal. Read its log, find out which order number it processed, and save its output. (Reading the journal needs sudo.)

How it works: the terminal below is a real Linux machine running in your browser. Click it and type. Tasks tick themselves off as you complete them; questions are answered in the box under each task. Press Reset any time for a fresh machine. Your password on this machine (for sudo) is student.

student@vulntech:~ Starting…
Getting your Linux machine ready…
The first start downloads about 20 MB. After that your browser keeps it, and labs start in a moment.

Hints

-u orders limits the journal to that one service.

The order number is in the ORDER NNNN lines the service logged.

Solution explanation

A systemd service's standard output goes straight into the journal, so sudo journalctl -u orders shows the lines the service printed, including processing ORDER 7788. -o cat > ~/orders.log saves them, and systemctl is-active orders confirms the service is still running.

Show solution
sudo journalctl -u orders --no-pager -o cat
sudo journalctl -u orders -o cat > ~/orders.log
systemctl is-active orders
HOME LEARN COMMUNITY DASHBOARD