lynis
lynis copied to clipboard
Systemd hang/stuck whatever
Describe the bug
I just installed Lynis via Git and run sudo ./lynis audit system
they always stuck on systemd (PLGN-3814)
If i install via package sudo apt-get install lynis -y
and run sudo lynis audit system
they run pretty good! But the Version is 3.0.7 and its outdated?
What i have to do now?
Version
- Distribution [e.g. Ubuntu 22.04]
- Lynis version [e.g. 3.0.9]
Expected behavior A clear and concise description of what you expected to happen.
Output If applicable, add output that you get from the tool or the related section of lynis.log
Additional context Add any other context about the problem here.
I've just had the same issue and I fixed it this way: copy default.prf to custom.prf add the following line in custom.prf under # Skip a test (one per line) skip-test=PLGN-3814
Reference: https://adamtheautomator.com/lynis/
We scan about 40 servers with Lynis over a Gitlab Pipeline. One server had the same issue, all others run perfect.
What i've found:
- only the output hang in "plugin: systemd"
- if i track
lynis.log
with atail -f
it hangs onPerforming test ID PLGN-3814 (Verify journal integrity)
- if I wait a long time, nothing happens - if I then press CTRL-C and finish thetail -f
, it scrolls to the end of the log and shows that it is finished. - the scan finishes without problems in the background (see it in
lynis.log
withLynis ended successfully.
as last entry
Lynis version 3.0.9 OS: Ubuntu 22.04
I've just had the same issue and I fixed it this way: copy default.prf to custom.prf add the following line in custom.prf under # Skip a test (one per line) skip-test=PLGN-3814
Reference: https://adamtheautomator.com/lynis/
Please don't copy the default.prf to custom.prf, but only add the differences to the latter one.
The issue shared by @Webdrian is often caused by huge journal files or even errors in its internal database structure. Something that we can't pick up from Lynis, as we simply query some commands and check their output. If a command hangs or takes a long while to complete, Lynis will simply wait for the command execution.
My suggestions:
- Run the command from this test manually and see what happens. Try to see if you can get a more verbose output
- Disable this particular plugin if it keeps failing (add it to your custom.prf, see default.prf for the structure on disabling a test)
So with no change that can be made (yet) to Lynis, I will close this issue.
Thanks for investigation and information!