diff --git a/ADconnection.sh b/ADconnection.sh index d0453cb..0fc4533 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -125,11 +125,16 @@ echo "session required pam_mkhomedir.so skel=/etc/skel/ umask=0022" | sudo tee - echo "auth required pam_listfile.so onerr=fail item=group sense=allow file=/etc/ssh/login.group.allowed" | sudo tee -a /etc/pam.d/common-auth sudo sh -c "echo 'greeter-show-manual-login=true' | sudo tee -a /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf" sudo sh -c "echo 'allow-guest=false' | sudo tee -a /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf" +sudo echo "Cheking if there is any previous configuration" +if [ -f /etc/ssh/login.group.allowed ] +then +echo "Files seems already to be modified.. skipping...." +else sudo touch /etc/ssh/login.group.allowed sudo echo "administrator" | sudo tee -a /etc/ssh/login.group.allowed sudo echo "$NetBios"'\'"$myhost""sudoers" | sudo tee -a /etc/ssh/login.group.allowed sudo echo "$NetBios"'\'"domain^admins" | sudo tee -a /etc/ssh/login.group.allowed -sudo echo "Cheking if there is any previous configuration" +fi if [ -f /etc/sudoers.d/sudoers ] then echo "Sudoersfile seems already to be modified.. skipping...."