mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 08:50:12 +01:00
Update ADconnection.sh
This commit is contained in:
parent
d69f94214d
commit
9e27da9a4b
@ -186,8 +186,13 @@ echo "session required pam_mkhomedir.so skel=/etc/skel/ umask=0022" | sudo tee -
|
|||||||
fi
|
fi
|
||||||
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 '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 sh -c "echo 'allow-guest=false' | sudo tee -a /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf"
|
||||||
|
## temp test ####
|
||||||
|
echo ""
|
||||||
|
echo $states
|
||||||
|
echo ""
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
|
||||||
checkthis(){
|
|
||||||
therealm=$(realm discover $DOMAIN | grep -i configured: | cut -d ':' -f2 | sed -e 's/^[[:space:]]*//')
|
therealm=$(realm discover $DOMAIN | grep -i configured: | cut -d ':' -f2 | sed -e 's/^[[:space:]]*//')
|
||||||
if [ $therealm = no ]
|
if [ $therealm = no ]
|
||||||
then
|
then
|
||||||
@ -195,16 +200,16 @@ echo Realm configured?.. "${RED_TEXT}"FAIL"${END}"
|
|||||||
else
|
else
|
||||||
echo Realm configured?.. "${INTRO_TEXT}"OK"${END}"
|
echo Realm configured?.. "${INTRO_TEXT}"OK"${END}"
|
||||||
fi
|
fi
|
||||||
|
if [ $states = 12 ]
|
||||||
|
then
|
||||||
|
echo "Sudoers not configured... skipping"
|
||||||
|
else
|
||||||
if [ -f /etc/sudoers.d/sudoers ]
|
if [ -f /etc/sudoers.d/sudoers ]
|
||||||
then
|
then
|
||||||
echo Checking sudoers file.. "${INTRO_TEXT}"OK"${END}"
|
echo Checking sudoers file.. "${INTRO_TEXT}"OK"${END}"
|
||||||
else
|
else
|
||||||
echo checking sudoers file.. "${RED_TEXT}"FAIL"${END}"
|
echo checking sudoers file.. "${RED_TEXT}"FAIL"${END}"
|
||||||
fi
|
fi
|
||||||
if [ $states =12 ]
|
|
||||||
then
|
|
||||||
echo "Sudoers not configured... skipping"
|
|
||||||
else
|
|
||||||
grouPs=$(cat /etc/sudoers.d/sudoers | grep -i $myhost | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
|
grouPs=$(cat /etc/sudoers.d/sudoers | grep -i $myhost | cut -d '%' -f2 | cut -d '=' -f1 | sed -e 's/\<ALL\>//g')
|
||||||
if [ $grouPs = "$myhost""sudoers" ]
|
if [ $grouPs = "$myhost""sudoers" ]
|
||||||
then
|
then
|
||||||
@ -249,8 +254,6 @@ echo "${INTRO_TEXT}Please reboot your machine and wait 3 min for Active Director
|
|||||||
eof
|
eof
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
checkthis
|
|
||||||
}
|
|
||||||
|
|
||||||
####################### Setup for Ubuntu server #######################################
|
####################### Setup for Ubuntu server #######################################
|
||||||
ubuntuserver14(){
|
ubuntuserver14(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user