Security-Onion-Solutions / security-onion

Security Onion 16.04 - Linux distro for threat hunting, enterprise security monitoring, and log management
https://securityonion.net
3.07k stars 522 forks source link

sosetup-network: Empty hostname set when running automated installs #1783

Closed weslambert closed 3 years ago

weslambert commented 4 years ago

An empty hostname is being set when running sosetup via sosetup -f. This is because the NEWHOSTNAME value is null. This causes the box to ultimately be renamed by Ubuntu to localhost. Setting the NEWHOSTNAME value as the hostname in the answerfile can be done as a workaround, however, sosetup-network's logic should be modified to allow automated installs.

https://github.com/Security-Onion-Solutions/securityonion-setup/blob/master/bin/sosetup-network#L63-L90

dougburks commented 3 years ago

securityonion-setup - 20120912-0ubuntu0securityonion330 is now ready for testing at ppa:securityonion/test.

cm-ops commented 3 years ago

Tested the following automated install answer files: sosetup.conf, sosetup-forward.conf, sosetup-master.conf, and sosetup-storage.conf. All were done using sosetup -f and in each test the HOSTNAME set on the test box remained after setup and was not changed to localhost by NEWHOSTNAME.

dougburks commented 3 years ago

Thanks @cm-ops !

dougburks commented 3 years ago

Published: https://blog.securityonion.net/2020/12/securityonion-setup-20120912.html