diff --git a/ADconnection.sh b/ADconnection.sh index 0f87bfe..ec92eb5 100644 --- a/ADconnection.sh +++ b/ADconnection.sh @@ -117,7 +117,7 @@ sudo echo "administrator ALL=(ALL:ALL) ALL" >> /etc/sudoers.d/sudoers sudo echo "%domain^admins ALL=(ALL:ALL) ALL" >> /etc/sudoers.d/sudoers sudo echo "%$myhost""sudoers ALL=(ALL:ALL) ALL" >> /etc/sudoers.d/sudoers sudo echo "%DOMAIN\ admins@$DOMAIN ALL=(ALL) ALL" >> /etc/sudoers.d/domain_admins -sudo realm permit --groups '"%$myhost""sudoers"' +sudo realm permit --groups "$myhost""sudoers" therealm=$(realm discover $DOMAIN | grep -i configured: | cut -d ':' -f2 | sed -e 's/^[[:space:]]*//') if [ $therealm = no ] then