Troubleshooting guide for Lynis
Troubleshooting Lynis
This document helps with solving most common issues experienced when running Lynis.
Common 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.
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.