mirror of
https://github.com/PierreGode/Linux-Active-Directory-join-script.git
synced 2025-12-21 16:50:13 +01:00
Update ADconnection.sh
This commit is contained in:
parent
7235f7227d
commit
53dae1f1fa
@ -151,7 +151,11 @@ fi;;
|
|||||||
[Nn]* ) echo "disabled SSH allow";;
|
[Nn]* ) echo "disabled SSH allow";;
|
||||||
* ) echo "Please answer yes or no.";;
|
* ) echo "Please answer yes or no.";;
|
||||||
esac
|
esac
|
||||||
|
echo ""
|
||||||
|
echo "-------------------------------------------------------------------------------------------"
|
||||||
|
echo ""
|
||||||
read -p "Do you wish to give users on this machine sudo rights? (y/n)?" yn
|
read -p "Do you wish to give users on this machine sudo rights? (y/n)?" yn
|
||||||
|
read -p "${RED_TEXT}"'Do you wish to give users on this machine sudo rights?'"${END}""${NUMBER}"'(y/n)?'"${END}" yn
|
||||||
case $yn in
|
case $yn in
|
||||||
[Yy]* ) sudo echo "Cheking if there is any previous configuration"
|
[Yy]* ) sudo echo "Cheking if there is any previous configuration"
|
||||||
if [ -f /etc/sudoers.d/sudoers ]
|
if [ -f /etc/sudoers.d/sudoers ]
|
||||||
@ -171,6 +175,7 @@ echo "session required pam_mkhomedir.so skel=/etc/skel/ umask=0022" | sudo tee -
|
|||||||
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"
|
||||||
|
|
||||||
|
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
|
||||||
@ -221,6 +226,7 @@ realm discover $DOMAIN
|
|||||||
echo "${INTRO_TEXT}Please reboot your machine and wait 3 min for Active Directory to sync before login${INTRO_TEXT}"
|
echo "${INTRO_TEXT}Please reboot your machine and wait 3 min for Active Directory to sync before login${INTRO_TEXT}"
|
||||||
eof
|
eof
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
####################### Setup for Ubuntu server #######################################
|
####################### Setup for Ubuntu server #######################################
|
||||||
ubuntuserver14(){
|
ubuntuserver14(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user