From c783173031bfa4d0bd7227974105d33c90d34a56 Mon Sep 17 00:00:00 2001 From: George Hunt Date: Mon, 29 May 2017 12:06:09 -0400 Subject: [PATCH] fix centos profile ssh error message --- roles/3-base-server/templates/profile_ssh_warn.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/roles/3-base-server/templates/profile_ssh_warn.sh b/roles/3-base-server/templates/profile_ssh_warn.sh index 74fa75641..d0dda0b78 100755 --- a/roles/3-base-server/templates/profile_ssh_warn.sh +++ b/roles/3-base-server/templates/profile_ssh_warn.sh @@ -4,7 +4,6 @@ check_hash () { if ! id -u xsce-admin > /dev/null 2>&1 ; then return 0 ; fi if grep -q "^PasswordAuthentication\s*no" /etc/ssh/sshd_config ; then return 0 ; fi - test -x /usr/bin/mkpasswd || return 0 SHADOW="$(sudo -n grep -E '^xsce-admin:' /etc/shadow 2>/dev/null)" test -n "${SHADOW}" || return 0 if echo $SHADOW | grep -q "xsce-admin:!" ; then return 0 ; fi @@ -17,7 +16,5 @@ check_hash () echo } -if /usr/sbin/service ssh status | grep -q running; then - check_hash -fi +systemctl is-active {{ sshd_service }} > /dev/null && check_hash unset check_hash