mirror of
https://github.com/konstruktoid/hardening.git
synced 2026-04-27 09:45:54 +03:00
[GH-ISSUE #167] [BUG] Missing /usr/sbin in PATH results in acct log rotation failure in /etc/cron.daily/acct #63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bob-rove on GitHub (Sep 14, 2022).
Original GitHub issue: https://github.com/konstruktoid/hardening/issues/167
Originally assigned to: @konstruktoid on GitHub.
Describe the bug
Modified system
PATHvariable results in/etc/cron.daily/acctbeing unable to locate/usr/sbin/invoke-rc.d, which is reported to/var/mail/rootwith corresponding message:This in turn results in
acctlog files not being fully rotated (process keeps writing to old file):To Reproduce
Wait until scripts in
/etc/cron.dailyare run and see/var/mail/root. Also check contents of/var/log/account/.Expected behavior
/usr/sbinpresent inPATHexposed tocron.System (lsb_release -a):
Additional context
None.
@konstruktoid commented on GitHub (Sep 14, 2022):
Thanks @bob-rove for reporting this, I'll have a look and fix as soon as possible.
@konstruktoid commented on GitHub (Sep 14, 2022):
I can't reproduce this, I'm using
cron.hourlyand manually runningtest -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.hourly )on bothfocalandjammy./usr/sbinshould also be in your$PATH, it was added 3 months ago:github.com/konstruktoid/hardening@5db5cbbb9c@bob-rove commented on GitHub (Sep 16, 2022):
Oh, my apologies! I've been using 4 month's old version and forgot to look in master 🤦
Great it was fixed already! 🚀