Closed gemal closed 1 month ago
Try running it with --debug and/or --verbose to see if it happens again.
Might be something related to the cron environment.
yes I can reproduce running it as cron but not from command line
when running in cron these are the lines from --debug --verbose
that I see
[DEBUG] Performing test ID FILE-6394 (Determine level of swappiness.)
[DEBUG] Performing test ID FILE-6398 (Checking if JBD (Journal Block Device) driver is loaded)
/usr/share/lynis/include/tests_filesystems: line 742: [: -eq: unary operator expected
[DEBUG] Performing test ID FILE-6410 (Checking Locate database)
[DEBUG] Performing test ID FILE-6430 (Disable mounting of some filesystems)
How can I provide more info?
Thanks, that was all information needed. Looks like a related test was not performed that determines the type of the Linux kernel (monolithic or modular). Commit https://github.com/CISOfy/lynis/commit/699ec384d248d4f64e1ce7f2daa1027be9557954 adds a test to see if we determined the kernel type.
Do you have the option to test it on your system to see if this truly fixes it?
Unfortunately I cant test it but it looks like it will fix it
Then let's consider it resolved for now and close this issue. If in 3.1.3 the issue remains, just let it know.
Describe the bug I run this as a cronjob:
lynis audit system --cronjob --warnings-only
this morning I got:/usr/share/lynis/include/tests_filesystems: line 742: [: -eq: unary operator expected
I logged in a reran the command but was unable to reproduce from command line
Version
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 lynis audit system --cronjob --warnings-only