1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

fix centos profile ssh error message

This commit is contained in:
George Hunt 2017-05-29 12:06:09 -04:00
parent dfdf86e5d6
commit c783173031

View file

@ -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