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
20553f6688
commit
1db1e8b52b
@ -120,6 +120,12 @@ sleep 1
|
|||||||
else
|
else
|
||||||
echo "session required pam_mkhomedir.so skel=/etc/skel/ umask=0022" | sudo tee -a /etc/pam.d/common-session
|
echo "session required pam_mkhomedir.so skel=/etc/skel/ umask=0022" | sudo tee -a /etc/pam.d/common-session
|
||||||
fi
|
fi
|
||||||
|
Arm=$( sudo hostnamectl | grep Architecture | awk '{print $2}' )
|
||||||
|
if [ "$Arm" = "arm" ]
|
||||||
|
then
|
||||||
|
sudo sh -c "echo 'greeter-show-manual-login=true' | sudo tee -a /usr/share/lightdm/lightdm.conf.d/50-ubuntu-mate.conf"
|
||||||
|
sudo sh -c "echo 'allow-guest=false' | sudo tee -a /usr/share/lightdm/lightdm.conf.d/50-ubuntu-mate.conf"
|
||||||
|
else
|
||||||
logintrue=$( cat /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf | grep -i -m1 login )
|
logintrue=$( cat /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf | grep -i -m1 login )
|
||||||
if [ -f /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf ]
|
if [ -f /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf ]
|
||||||
then
|
then
|
||||||
@ -133,6 +139,7 @@ fi
|
|||||||
else
|
else
|
||||||
echo "No lightdm to configure"
|
echo "No lightdm to configure"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
clear
|
clear
|
||||||
sed -i -e 's/fallback_homedir = \/home\/%u@%d/#fallback_homedir = \/home\/%u@%d/g' /etc/sssd/sssd.conf
|
sed -i -e 's/fallback_homedir = \/home\/%u@%d/#fallback_homedir = \/home\/%u@%d/g' /etc/sssd/sssd.conf
|
||||||
sed -i -e 's/use_fully_qualified_names = True/use_fully_qualified_names = False/g' /etc/sssd/sssd.conf
|
sed -i -e 's/use_fully_qualified_names = True/use_fully_qualified_names = False/g' /etc/sssd/sssd.conf
|
||||||
@ -416,7 +423,7 @@ TheOS=$( hostnamectl | grep -i Operating | awk '{print $3}' ) < /dev/null > /dev
|
|||||||
MintOS=$( hostnamectl | grep -i Operating | awk '{print $4}' ) < /dev/null > /dev/null 2>&1
|
MintOS=$( hostnamectl | grep -i Operating | awk '{print $4}' ) < /dev/null > /dev/null 2>&1
|
||||||
rasp=$( lsb_release -a | grep -i Distributor | awk '{print $3}' ) < /dev/null > /dev/null 2>&1
|
rasp=$( lsb_release -a | grep -i Distributor | awk '{print $3}' ) < /dev/null > /dev/null 2>&1
|
||||||
kalilinux=$( lsb_release -a | grep -i Distributor | awk '{print $3}' ) < /dev/null > /dev/null 2>&1
|
kalilinux=$( lsb_release -a | grep -i Distributor | awk '{print $3}' ) < /dev/null > /dev/null 2>&1
|
||||||
Arm=$( sudo hostnamectl | grep Architecture | awk '{print $2}' )
|
|
||||||
|
|
||||||
#### OS detection ####
|
#### OS detection ####
|
||||||
if [ "$TheOS" = "Fedora" ] < /dev/null > /dev/null 2>&1
|
if [ "$TheOS" = "Fedora" ] < /dev/null > /dev/null 2>&1
|
||||||
@ -444,16 +451,8 @@ desktop=$( sudo apt list --installed | grep -i desktop | grep -i ubuntu | cut -d
|
|||||||
if [ "$desktop" = "desktop" ] < /dev/null > /dev/null 2>&1
|
if [ "$desktop" = "desktop" ] < /dev/null > /dev/null 2>&1
|
||||||
then
|
then
|
||||||
echo "Ubuntu Desktop detected"
|
echo "Ubuntu Desktop detected"
|
||||||
#UbuntU
|
|
||||||
if [ "$Arm" = "arm" ]
|
|
||||||
then
|
|
||||||
sudo sh -c "echo 'greeter-show-manual-login=true' | sudo tee -a /usr/share/lightdm/lightdm.conf.d/50-ubuntu-mate.conf"
|
|
||||||
sudo sh -c "echo 'allow-guest=false' | sudo tee -a /usr/share/lightdm/lightdm.conf.d/50-ubuntu-mate.conf"
|
|
||||||
UbuntU
|
UbuntU
|
||||||
else
|
else
|
||||||
UbuntU
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo " this seems to be a server, swithching to server mode"
|
echo " this seems to be a server, swithching to server mode"
|
||||||
ubuntuserver14
|
ubuntuserver14
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user