diff --git a/ADconnection.sh b/ADconnection.sh index 4f57788..5578005 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -25,15 +25,6 @@ sudo ####################### Setup for Ubuntu16 and Ubuntu 14 clients ####################################### ubuntuclient(){ export HOSTNAME -#variables -myhost=$( hostname ) -NetBios=$(echo $DOMAIN | cut -d '.' -f1) -discovery=$(realm discover $DOMAIN | grep domain-name) -var=$(lsb_release -a | grep -i release: | cut -d ':' -f2 | cut -d '.' -f1) -guest=$(cat /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf | grep -i allow-guest | grep -i false | cut -d '=' -f2) -grouPs=$(cat /etc/sudoers.d/sudoers | grep -i $myhost | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\//g') -therealm=$(realm discover | grep -i configured: | cut -d ':' -f2 | sed -e 's/^[[:space:]]*//') -# sudo apt-get install realmd adcli sssd -y sudo apt-get install ntp -y clear @@ -123,6 +114,15 @@ echo Checking login configuration.. "${INTRO_TEXT}"OK"${END}" else echo Checking login configuration.. "${RED_TEXT}"FAIL"${END}" fi +#variables +myhost=$( hostname ) +NetBios=$(echo $DOMAIN | cut -d '.' -f1) +discovery=$(realm discover $DOMAIN | grep domain-name) +var=$(lsb_release -a | grep -i release: | cut -d ':' -f2 | cut -d '.' -f1) +guest=$(cat /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf | grep -i allow-guest | grep -i false | cut -d '=' -f2) +grouPs=$(cat /etc/sudoers.d/sudoers | grep -i $myhost | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\//g') +therealm=$(realm discover | grep -i configured: | cut -d ':' -f2 | sed -e 's/^[[:space:]]*//') +# exec sudo -u root /bin/sh - <