mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 08:50:12 +01:00
Fixed small bugs
This commit is contained in:
parent
095ab9b91e
commit
3ff61fc2b6
@ -101,7 +101,7 @@ sudo echo "%DOMAIN\ admins ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/
|
|||||||
#sudo realm permit --groups "$myhost""sudoers"
|
#sudo realm permit --groups "$myhost""sudoers"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
[Nn]* )
|
[Nn]* )
|
||||||
sudo echo "administrator ALL=(ALL:ALL) ALL" | sudo tee -a /etc/sudoers.d/sudoers
|
sudo echo "administrator ALL=(ALL:ALL) ALL" | sudo tee -a /etc/sudoers.d/sudoers
|
||||||
sudo echo "%$myhost""sudoers ALL=(ALL:ALL) ALL" | sudo tee -a /etc/sudoers.d/sudoers
|
sudo echo "%$myhost""sudoers ALL=(ALL:ALL) ALL" | sudo tee -a /etc/sudoers.d/sudoers
|
||||||
sudo echo "%DOMAIN\ admins ALL=(ALL:ALL) ALL" | sudo tee -a /etc/sudoers.d/domain_admins
|
sudo echo "%DOMAIN\ admins ALL=(ALL:ALL) ALL" | sudo tee -a /etc/sudoers.d/domain_admins
|
||||||
@ -213,7 +213,7 @@ else
|
|||||||
echo "Checking PAM configuration.. ${RED_TEXT}FAIL${END}"
|
echo "Checking PAM configuration.. ${RED_TEXT}FAIL${END}"
|
||||||
fi
|
fi
|
||||||
if [ $states1 = 12 ]
|
if [ $states1 = 12 ]
|
||||||
then
|
then
|
||||||
echo "Disabled SSH login.group.allowed"
|
echo "Disabled SSH login.group.allowed"
|
||||||
else
|
else
|
||||||
cauth=$(grep required /etc/pam.d/common-auth | grep onerr | grep allow | cut -d '=' -f4 | awk '{print $1}')
|
cauth=$(grep required /etc/pam.d/common-auth | grep onerr | grep allow | cut -d '=' -f4 | awk '{print $1}')
|
||||||
@ -409,7 +409,7 @@ else
|
|||||||
echo "Checking PAM configuration.. FAIL"
|
echo "Checking PAM configuration.. FAIL"
|
||||||
fi
|
fi
|
||||||
if [ "$states1" = "12" ]
|
if [ "$states1" = "12" ]
|
||||||
then
|
then
|
||||||
echo "Disabled SSH login.group.allowed"
|
echo "Disabled SSH login.group.allowed"
|
||||||
else
|
else
|
||||||
cauth=$(grep required /etc/pam.d/sshd | grep onerr | grep allow | cut -d '=' -f4 | awk '{print $1}')
|
cauth=$(grep required /etc/pam.d/sshd | grep onerr | grep allow | cut -d '=' -f4 | awk '{print $1}')
|
||||||
@ -974,7 +974,7 @@ echo "Please enter the domain you wish to join:"
|
|||||||
read -r DOMAIN
|
read -r DOMAIN
|
||||||
echo "I Please enter AD admin user "
|
echo "I Please enter AD admin user "
|
||||||
read -r ADMIN
|
read -r ADMIN
|
||||||
fi
|
fi
|
||||||
sudo echo "Realm= $DOMAIN"
|
sudo echo "Realm= $DOMAIN"
|
||||||
sudo echo ""
|
sudo echo ""
|
||||||
sudo realm join -v -U "$ADMIN" "$DOMAIN" --install=/
|
sudo realm join -v -U "$ADMIN" "$DOMAIN" --install=/
|
||||||
@ -1283,7 +1283,7 @@ echo "${NUMBER}Remember!you must be logged in with AD admin on the client/server
|
|||||||
echo "${NUMBER}Remember!please edit in ldap.conf the lines BASE and URI in /etc/ldap/ldap.conf ${END}"
|
echo "${NUMBER}Remember!please edit in ldap.conf the lines BASE and URI in /etc/ldap/ldap.conf ${END}"
|
||||||
sleep 3
|
sleep 3
|
||||||
if [ "$ldaptools" = dap-uti ]
|
if [ "$ldaptools" = dap-uti ]
|
||||||
then
|
then
|
||||||
echo "ldap tool installed.. trying to find this host"
|
echo "ldap tool installed.. trying to find this host"
|
||||||
sudo ldapsearch cn="$myhost'*'"
|
sudo ldapsearch cn="$myhost'*'"
|
||||||
echo "Please type what you are looking for"
|
echo "Please type what you are looking for"
|
||||||
@ -1421,7 +1421,7 @@ read -r -p "Do you really want to leave the domain: $DOMAIN (y/n)?" yn
|
|||||||
;;
|
;;
|
||||||
* ) echo 'Please answer yes or no.';;
|
* ) echo 'Please answer yes or no.';;
|
||||||
esac
|
esac
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
########################################### info #######################################
|
########################################### info #######################################
|
||||||
@ -1569,7 +1569,7 @@ while [ "$opt" != '' ]
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
################# Precheck for YUM based OS #################
|
################# Precheck for YUM based OS #################
|
||||||
PRECHECK_FN(){
|
PRECHECK_FN(){
|
||||||
## Precheck sends yum based OS to an own menu ##
|
## Precheck sends yum based OS to an own menu ##
|
||||||
TheOS=$( hostnamectl | grep -i Operating | awk '{print $3}' ) < /dev/null > /dev/null 2>&1
|
TheOS=$( hostnamectl | grep -i Operating | awk '{print $3}' ) < /dev/null > /dev/null 2>&1
|
||||||
@ -1631,7 +1631,7 @@ while test $# -gt 0; do
|
|||||||
-s)
|
-s)
|
||||||
if test $# -gt 0; then
|
if test $# -gt 0; then
|
||||||
realm < /dev/null > /dev/null 2>&1
|
realm < /dev/null > /dev/null 2>&1
|
||||||
if [ "$?" = "0" ]
|
if [ "$?" = "0" ]
|
||||||
then
|
then
|
||||||
sudo realm discover
|
sudo realm discover
|
||||||
exit
|
exit
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user