diff --git a/Anvil/Tools.pm b/Anvil/Tools.pm index 1addce07..87ed9f6e 100644 --- a/Anvil/Tools.pm +++ b/Anvil/Tools.pm @@ -1131,6 +1131,7 @@ sub _set_paths provision => "/mnt/shared/provision", temp => "/mnt/shared/temp", }, + 'sshd_config.d' => "/etc/ssh/sshd_config.d", skins => "/var/www/html/skins", status => "/var/www/html/status", syslinux => "/usr/share/syslinux", diff --git a/tools/anvil-daemon b/tools/anvil-daemon index 51ff9437..05e6cdd0 100755 --- a/tools/anvil-daemon +++ b/tools/anvil-daemon @@ -101,6 +101,9 @@ if (not $anvil->data->{sys}{database}{connections}) } else { + # Striker can't initialize us unless it can ssh into us, so make sure root login is enabled. + chech_sshd($anvil); + # Wait until we have one. $anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 0, key => "error_0075"}); @@ -1035,6 +1038,13 @@ sub chech_sshd { my ($anvil) = @_; + # On EL8, the 'sshd_config.d' directory doesn't exist and root is enabled. + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { 'path::directories::sshd_config.d' => $anvil->data->{path}{directories}{'sshd_config.d'} }}); + if (not -d $anvil->data->{path}{directories}{'sshd_config.d'}) + { + return(0); + } + $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { 'path::configs::sshd_root_password' => $anvil->data->{path}{configs}{sshd_root_password} }}); if (not -f $anvil->data->{path}{configs}{sshd_root_password}) {