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
3031744a78
commit
7690d756c0
@ -995,7 +995,9 @@ LEFT=$(sudo realm discover | grep configured | awk '{print $2}')
|
|||||||
DOMAIN=$(realm discover | grep -i realm.name | awk '{print $2}')
|
DOMAIN=$(realm discover | grep -i realm.name | awk '{print $2}')
|
||||||
if [ "$LEFT" = "no" ]
|
if [ "$LEFT" = "no" ]
|
||||||
then
|
then
|
||||||
|
echo ""
|
||||||
echo "$DOMAIN has not been configured"
|
echo "$DOMAIN has not been configured"
|
||||||
|
echo ""
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
read -p "Do you really want to leave the domain: $DOMAIN (y/n)?" yn
|
read -p "Do you really want to leave the domain: $DOMAIN (y/n)?" yn
|
||||||
@ -1003,6 +1005,7 @@ read -p "Do you really want to leave the domain: $DOMAIN (y/n)?" yn
|
|||||||
[Yy]* ) echo "Listing domain"
|
[Yy]* ) echo "Listing domain"
|
||||||
sudo realm discover $DOMAIN
|
sudo realm discover $DOMAIN
|
||||||
sudo realm leave $DOMAIN
|
sudo realm leave $DOMAIN
|
||||||
|
LEFT=$(sudo realm discover | grep configured | awk '{print $2}')
|
||||||
if [ "$LEFT" = "no" ]
|
if [ "$LEFT" = "no" ]
|
||||||
then
|
then
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user