From 746cc401fedfdbd18b5fc2e8c6e250f6a0bf079d Mon Sep 17 00:00:00 2001 From: PierreGoude Date: Thu, 26 Jan 2017 11:47:02 +0100 Subject: [PATCH] Update ADconnection.sh --- ADconnection.sh | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/ADconnection.sh b/ADconnection.sh index aa20add..8db67e1 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -7,7 +7,6 @@ # # ##################################################################################################################### - # ~~~~~~~~~~ Environment Setup ~~~~~~~~~~ # NORMAL=`echo "\033[m"` MENU=`echo "\033[36m"` #Blue @@ -131,9 +130,7 @@ sed -i -e 's/use_fully_qualified_names = True/use_fully_qualified_names = False/ echo "override_homedir = /home/%d/%u" >> /etc/sssd/sssd.conf eof } - ####################### Setup for Ubuntu 14 server ####################################### - ubuntuserver14(){ sudo wget http://download.beyondtrust.com/PBISO/8.0.1/linux.deb.x64/pbis-open-8.0.1.2029.linux.x86_64.deb.sh sudo chmod 777 pbis-open-8.0.1.2029.linux.x86_64.deb.sh @@ -184,52 +181,37 @@ sudo cat /etc/sudoers | grep $Group echo "In SSH allow file..." sudo cat /etc/ssh/login.group.allowed | grep $Group echo "If this is wrong DO NOT REBOOT and contact sysadmin" - } - - ####################### Setup for Debian client ####################################### - # This script should join Debian Jessie (8) to an Active Directory domain. debianclient(){ export HOSTNAME myhost=$( hostname ) - sudo apt-get update sudo apt-get install libsss-sudo -y sudo apt-get install realmd adcli sssd -y sudo apt-get install ntp -y sudo mkdir -p /var/lib/samba/private - clear echo "Please enter the domain you wish to join: " read DOMAIN - echo "Please enter Your domain’s NetBios name" read NetBios - echo "Please enter a domain admin login to use: " read ADMIN - -sudo realm join --user=$ADMIN $DOMAIN - +sudo realm join --user=$ADMIN $DOMAIN if [ $? -ne 0 ]; then echo "AD join failed. Please run 'journalctl -xn' to determine why." exit 1 fi - sudo systemctl enable sssd sudo systemctl start sssd - echo "session required pam_mkhomedir.so skel=/etc/skel/ umask=0022" | sudo tee -a /etc/pam.d/common-session - # configure sudo - echo "Please enter new user without @mydomain" read newuser echo "%domain\ admins@$DOMAIN ALL=(ALL) ALL" | sudo tee -a /etc/sudoers.d/domain_admins sudo echo "$newuser"'@'"$DOMAIN"" ALL=(ALL:ALL) ALL" >> /etc/sudoers - while true; do read -p 'Do you want to Reboot now? (y/n)?' yn case $yn in @@ -290,10 +272,7 @@ sed -i -e 's/use_fully_qualified_names = True/use_fully_qualified_names = False/ echo "override_homedir = /home/%d/%u" >> /etc/sssd/sssd.conf eof } - - ############################### Reauth ########################################## - Reauthenticate14(){ echo "Reauth for Likewise only!" echo "Type domain"