Event details
Whether you're in the exploratory stage or already implementing Intune for macOS, we invite you to join this Ask Microsoft Anything (AMA) to see a demonstration of the new Platform Single Sign-On (Pl...
Char_Cheesman
Updated Dec 27, 2024
Kaiserbot
Mar 20, 2024Copper Contributor
LOCAL ADMIN Account : once a macOS is enrolled you can run a shell script to remove all local admin account on that machine without having another admin account 🙂 Deploy this to all users using intune shell script and their admin priv will go away after the first logoff ! Run script as signed-in user = No
LoggedInUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name 😕 && ! /loginwindow/ { print $3 }' ) echo " $(date) | Remove Local Admin:"
$LoggedInUser dseditgroup -o edit -d $LoggedInUser -t user admin
You will endup having a macOS without any localAdmin.. (if the device is multi-user) 😄