mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 16:50:13 +01:00
Added flag options see: sudo sh ADconnection.sh --help
This commit is contained in:
parent
8fec01a190
commit
59fcb18e2b
@ -928,17 +928,23 @@ echo "${INTRO_TEXT} $
|
||||
echo "${INTRO_TEXT} Domain username:"${RED_TEXT}Example:${RED_TEXT}"" ${NUMBER}ADadmin${NUMBER}"${INTRO_TEXT}"
|
||||
echo "${INTRO_TEXT} ${INTRO_TEXT}"
|
||||
echo "${INTRO_TEXT} AD Group to put users in:"${RED_TEXT}Example:${RED_TEXT}"" ${NUMBER}Sudoers.global${NUMBER}"${INTRO_TEXT}"
|
||||
echo "${RED_TEXT} User and computer must Exist in AD before Join ${RED_TEXT}"
|
||||
echo "${RED_TEXT} group should be created in AD with the groupname beeing the HOSTNAMEsudores ${RED_TEXT}"
|
||||
echo "${INTRO_TEXT} ${INTRO_TEXT}"
|
||||
echo "${INTRO_TEXT} Script will use hostname and add sudoer to it to sudoers "${RED_TEXT}Example:${RED_TEXT}""${NUMBER} myhostsudoer${NUMBER}"${INTRO_TEXT}"
|
||||
echo "${INTRO_TEXT} It is important that the computerobject "${RED_TEXT}Ex:${RED_TEXT}" myhost exists in AD ${INTRO_TEXT}"
|
||||
echo "${INTRO_TEXT} It is important that the computerobject "${RED_TEXT}Ex:${RED_TEXT}" myhost gets created in AD pre or post running the script ( the join will create an computer object by it self ${INTRO_TEXT}"
|
||||
echo "${INTRO_TEXT} and that the group "${RED_TEXT}Ex:${RED_TEXT}" myhostsudoes exists, sudoers must be added or edit this script to remove sudoers from name${INTRO_TEXT}"
|
||||
echo "${INTRO_TEXT} Script will also add domain admin group to sudoes ${INTRO_TEXT}"
|
||||
echo "${NUMBER} Remember to Check Hostname and add it to AD before running the ADjoin${NUMBER}"
|
||||
echo "${NUMBER} Remember to Check Hostname and add it to AD${NUMBER}"
|
||||
echo "${INTRO_TEXT} Reauthenticate is a fix for Ubuntu 14 likewise issues when client looses user (who am I?)${INTRO_TEXT}"
|
||||
echo "${INTRO_TEXT} ${INTRO_TEXT}"
|
||||
echo "${INTRO_TEXT} Ubuntu 16 and 14 has the setting not to show domain name in name or homefolder due it can give${INTRO_TEXT}"
|
||||
echo "${INTRO_TEXT} coding issues when building.. to change this configure /et/sssd/sssd.conf ${INTRO_TEXT}"
|
||||
echo ""
|
||||
echo ""
|
||||
echo "AD-Connection flags"
|
||||
echo "-d ubuntu debug mode GNU required"
|
||||
echo "-l Run script and log to logfile"
|
||||
echo ""
|
||||
exit
|
||||
}
|
||||
MENU_FN(){
|
||||
@ -953,13 +959,11 @@ clear
|
||||
echo "${MENU}*${NUMBER} 1)${MENU} Join to AD on Linux (Ubuntu/Rasbian) ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 2)${MENU} Join to AD on Debian Jessie Client ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 3)${MENU} Join to AD on CentOS ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 4)${MENU} Join to AD on Ubuntu Client or Server in debug mode ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 5)${MENU} Check for errors ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 6)${MENU} Search with ldap ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 7)${MENU} Reauthenticate (Ubuntu14 only) ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 8)${MENU} Update from Likewise to Realmd for Ubuntu 14 ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 9)${MENU} Leave Domain ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 10)${MENU} README with examples ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 4)${MENU} Check for errors ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 5)${MENU} Search with ldap ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 6)${MENU} Reauthenticate (Ubuntu14 only) ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 7)${MENU} Update from Likewise to Realmd for Ubuntu 14 ${NORMAL}"
|
||||
echo "${MENU}*${NUMBER} 8)${MENU} Leave Domain ${NORMAL}"
|
||||
echo "${NORMAL} ${NORMAL}"
|
||||
echo "${ENTER_LINE}Please enter a menu option and enter or ${RED_TEXT}enter to exit. ${NORMAL}"
|
||||
read opt
|
||||
@ -982,34 +986,26 @@ while [ opt != '' ]
|
||||
CentOS
|
||||
;;
|
||||
4) clear;
|
||||
echo "Join to AD on Ubuntu Client or Server in debug mode"
|
||||
linuxclientdebug
|
||||
;;
|
||||
5) clear;
|
||||
echo "Check for errors"
|
||||
failcheck
|
||||
;;
|
||||
6) clear;
|
||||
5) clear;
|
||||
echo "Check in Ldap"
|
||||
ldaplook
|
||||
;;
|
||||
7) clear;
|
||||
6) clear;
|
||||
echo "Rejoin to AD"
|
||||
Reauthenticate
|
||||
;;
|
||||
8) clear;
|
||||
7) clear;
|
||||
echo "Update from Likewise to Realmd"
|
||||
Realmdupdate
|
||||
;;
|
||||
9)
|
||||
8)
|
||||
clear;
|
||||
echo "Leave domain"
|
||||
leave
|
||||
;;
|
||||
10) clear;
|
||||
echo "READ ME"
|
||||
readmes
|
||||
;;
|
||||
x)exit;
|
||||
;;
|
||||
\n)exit;
|
||||
@ -1022,4 +1018,25 @@ while [ opt != '' ]
|
||||
fi
|
||||
done
|
||||
}
|
||||
clear
|
||||
if [ "$1" = "--help" ]
|
||||
then
|
||||
clear
|
||||
readmes
|
||||
exit
|
||||
else
|
||||
if [ "$1" = "-d" ]
|
||||
then
|
||||
linuxclientdebug
|
||||
else
|
||||
if [ "$1" = "-l" ]
|
||||
then
|
||||
DATE=`date +%H:%M`
|
||||
MENU_FN 2>&1 | sudo tee ADconnection.log
|
||||
exit
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
MENU_FN
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user