mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 08:50:12 +01:00
Update ADconnection.sh
This commit is contained in:
parent
803a424d02
commit
4d4c6501f8
@ -265,7 +265,7 @@ then
|
|||||||
echo "Files seems already to be modified, skipping..."
|
echo "Files seems already to be modified, skipping..."
|
||||||
else
|
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 "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
|
sudo touch /etc/ssh/login.group.allowed
|
||||||
admins=$( cat /etc/passwd | grep home | grep bash | cut -d ':' -f1 )
|
admins=$( cat /etc/passwd | grep home | grep bash | cut -d ':' -f1 )
|
||||||
echo ""
|
echo ""
|
||||||
@ -412,7 +412,7 @@ if [ $states1 = 12 ]
|
|||||||
then
|
then
|
||||||
echo "Disabled SSH login.group.allowed"
|
echo "Disabled SSH login.group.allowed"
|
||||||
else
|
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
|
if [ $cauth = allow ] < /dev/null > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
echo "Checking PAM auth configuration.. OK"
|
echo "Checking PAM auth configuration.. OK"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user