diff --git a/update.sh b/update.sh index 59631e1..40cd94e 100644 --- a/update.sh +++ b/update.sh @@ -64,7 +64,7 @@ if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then apt autoremove -y # modify ssh to allow root login and then restart the service - sed --in-place "s/^.PermitRootLogin\ prohibit-password/PermitRootLogin\ yes/" /etc/ssh/sshd_config + sed --in-place "s/^.PermitRootLogin.*/PermitRootLogin\ yes/" /etc/ssh/sshd_config systemctl restart sshd # GauntDC01-CA @@ -108,7 +108,7 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then systemctl start uptimed systemctl enable uptimed fi - # Centos 7 + # Centos 8/Rocky 9.0 if [ "${OS_VERSION}" == "8" ] || [ "${OS_VERSION}" == "9.0" ]; then # upgrade all packages dnf update -y @@ -117,7 +117,7 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then dnf install -y elrepo-release epel-release yum-utils # enable powertools - dnf config-manager --set-enabled PowerTools + dnf config-manager --enable crb # clean the yum cache dnf clean all @@ -142,7 +142,7 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then fi # modify ssh to allow root login and then restart the service - sed --in-place "s/^#PermitRootLogin\ yes/PermitRootLogin\ yes/" /etc/ssh/sshd_config + sed --in-place "s/^.PermitRootLogin.*/PermitRootLogin\ yes/" /etc/ssh/sshd_config systemctl restart sshd # GauntDC01-CA