diff --git a/ADconnection.sh b/ADconnection.sh index e122adc..3ad5269 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -95,7 +95,7 @@ sudo echo "%$myhost""sudoers ALL=(ALL:ALL) ALL" >> /etc/sudoers.d/sudoers sudo echo "%DOMAIN\ admins@$DOMAIN ALL=(ALL) ALL" >> /etc/sudoers.d/domain_admins echo "Check that the group is correct" echo "In Sudoers file..." -sudo cat /etc/sudoers.d/users | grep sudoers +sudo cat /etc/sudoers.d/sudoers | grep sudoers echo "In SSH allow file..." sudo cat /etc/ssh/login.group.allowed | grep $myhost echo "If this is wrong DO NOT REBOOT and contact sysadmin" @@ -131,7 +131,7 @@ fi sudo echo "Configuratig files" sudo systemctl enable sssd sudo systemctl start sssd -sudo rm tmp.sh +sudo echo "###################" sudo sed -i '30s/.*/session [success=ok default=ignore] pam_lsass.so/' /etc/pam.d/common-session sudo sh -c "sed -i 's|ChallengeResponseAuthentication yes|ChallengeResponseAuthentication no|' /etc/ssh/sshd_config" sudo sh -c "echo 'auth required pam_listfile.so onerr=fail item=group sense=allow file=/etc/ssh/login.group.allowed' >> /etc/pam.d/common-auth"