From 4d4c6501f8b991de11f10224d789df0723047376 Mon Sep 17 00:00:00 2001 From: PierreGode Date: Mon, 11 Feb 2019 13:35:12 +0100 Subject: [PATCH] Update ADconnection.sh --- ADconnection.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ADconnection.sh b/ADconnection.sh index e2c2255..0555801 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -265,7 +265,7 @@ then echo "Files seems already to be modified, skipping..." else echo "NOTICE! /etc/ssh/login.group.allowed will be created. make sure yor local user is in it you you could be banned from login" -echo "auth required pam_listfile.so onerr=fail item=group sense=allow file=/etc/ssh/login.group.allowed" | sudo tee -a /etc/pam.d/system-auth +echo "auth required pam_listfile.so onerr=fail item=group sense=allow file=/etc/ssh/login.group.allowed" | sudo tee -a /etc/pam.d/sshd sudo touch /etc/ssh/login.group.allowed admins=$( cat /etc/passwd | grep home | grep bash | cut -d ':' -f1 ) echo "" @@ -412,7 +412,7 @@ if [ $states1 = 12 ] then echo "Disabled SSH login.group.allowed" else -cauth=$(cat /etc/pam.d/system-auth | grep required | grep onerr | grep allow | cut -d '=' -f4 | awk '{print $1}') +cauth=$(cat /etc/pam.d/sshd | grep required | grep onerr | grep allow | cut -d '=' -f4 | awk '{print $1}') if [ $cauth = allow ] < /dev/null > /dev/null 2>&1 then echo "Checking PAM auth configuration.. OK"