I was searching around and looking for a possible way to start removing/limiting what users can install/do on there own. I run everything on JamF and I wanted to start cracking down on this as our windows machines are pretty locked down on what a local user can do.
(Removes Local Admin.)
(Replace USERNAME with the user's name that you’d like to remove from admin.)
dseditgroup -o edit -d USERNAME -t user admin
—----------------------------------------------------
(One user per machine.)
#!/bin/sh
LoggedInUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
dseditgroup -o edit -d $LoggedInUser -t user admin
—----------------------------------------------------
(Change Standard Member -D to Admin Account -A.)
dseditgroup -o edit -a $LoggedInUser -t user admin
I found and formatted/referenced these scripts and I was wondering if this is still what is used for 2019+ MBP's. Mainly the new M1/M2 devices before I start a test environment.
Thank you for the future replies/guidance.