Situation
The company portal reads its settings from /etc/portal/portal.conf. This morning it turned out to have
debug = true, open sign-up and the address of someone else's database. You put the working settings back — a
minute later the file was the same as before:
cat /etc/portal/portal.conf
ls -l /etc/portal/portal.conf
The portal group can write the config — the developers and the deployment account. Your crontab -l is empty,
and /etc/cron.d holds only the settings backup.
Task
- Put an audit rule on writes to
/etc/portal/portal.conf. The rule is in effect now and lives in/etc/audit/rules.d— it survives a reboot. - Use the audit events to find who rewrites the config. Write to
~/culprit.txt, on one line, the user name and the full path of the program that writes to the file. - Take that job off the schedule.
- Leave everything else as it was: cron runs, the other users' jobs and the backup are in place, and the
portalgroup keeps write access to the config.
There is no internet on the machine; everything you need is already installed. Run administrative commands with
sudo.
Lab goals
0 of 4-
An audit rule watches writes to /etc/portal/portal.conf — it is in effect now and lives in /etc/audit/rules.d — not checked yet
-
~/culprit.txt names the user and the full path of the program that writes to the config — not checked yet
-
The job that changes the config is no longer scheduled — not checked yet
-
Everything else is as before — cron runs, the other jobs and the backup are in place, the portal group can write the config — not checked yet
Hints
0 of 3 open · they open one at a time
Hint 1
Show the solution
after 3 failed checks