Troubleshooting guide for Lynis

Troubleshooting Lynis

This document helps with solving most common issues experienced when running Lynis.

Errors

No hostid and/or hostid2 found

Some systems do not have the OpenSSH server package installed. In this case, the hostid2 value may be missing. During the upload it may result in an error.

Error: No hostid and/or hostid2 found. Can not upload report file.

To see what Lynis discovered, use the show command.

lynis show hostids

If the hostid2 is missing, we can tell Lynis to use one that is generated and unique for that system.

openssl rand 1024 | sha256sum | awk '{ print "hostid2="$1 }'

Append the output of this command (hostid2=xxxxxx) to your custom.prf. Then run the show command again. If the value is properly filled, it should allow you to do the upload.

Warning: if you deploy Lynis with a configuration management tool, make sure that each system has a unique identifier. Systems may otherwise overwrite data from other systems when uploading it to the central system.

Error: Unknown protocol, please specify (http, https) in profile (update_server_protocol)

This error may show up when using the lynis update release command. This is a depecrated command. Use a new version from the software repository.

One more thing...

Keep learning

So you are interested in Linux security? Join the Linux Security Expert training program, a practical and lab-based training ground. For those who want to become (or stay) a Linux security expert.

See training package




Lynis Enterprise screenshot to help with system hardeningSecurity scanning with Lynis and Lynis Enterprise

Run automated security scans and increase your defenses. Lynis is an open source security tool to perform in-depth audits. It helps with system hardening, vulnerability discovery, and compliance.


Download

Leave a Reply

Your email address will not be published. Required fields are marked *