Create ADconnection.sh

This commit is contained in:
PierreGoude 2017-06-14 10:07:54 +02:00 committed by GitHub
parent c87db79065
commit f99e850b1a

View File

@ -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...."