Update collector script with debug output, list rejected ssh users

In the check script print out current rejected (not allowed) ssh users

Collect log info script has now debug output and proper options flags
This commit is contained in:
Clemens Schwaighofer
2022-11-22 09:33:52 +09:00
parent cae5c8a19a
commit 6e53d1bdec
3 changed files with 87 additions and 22 deletions

View File

@@ -111,6 +111,11 @@ for user in $(cat /etc/group|grep "${ssh_group}:" | cut -d ":" -f 4 | sed -e 's/
fi;
printf "* Checking user %-20s: %s\n" "${user}" "${out_string}";
done;
echo "--------------------->"
echo "Showing current SSH Reject users:"
for user in $(cat /etc/group|grep "${ssh_reject_group}:" | cut -d ":" -f 4 | sed -e 's/,/ /g'); do
echo "${user}";
done;
if [ ! -z "${delete_accounts}" ]; then
echo "--------------------->"
echo "% Run list below to move users to reject ssh group";