Posted on 01-25-2022 11:52 AM
Unable to find an adequate script to make all Standard users Administrators. I am new to scripting and have only been able to find a script that does it temporarily and reverts the account back to standard.
This is what I have found so far.
https://github.com/jamf/MakeMeAnAdmin
I also need it to run without user prompting
Solved! Go to Solution.
Posted on 01-25-2022 12:34 PM
I'm quite tempted to ask why you'd want to do this. Most cases it's someone looking to revoke admin rights, not permanently grant them to all users.
That being said, I think the MakeMeAnAdmin script you found already has the answer within it. This line will convert the $currentUser to an admin:
/usr/sbin/dseditgroup -o edit -a $currentUser -t user admin
If you have more than one user to do this with per system, then you'll have to gather all the standard user accounts and put them in a list to loop over and run that command above on each one.
Posted on 01-25-2022 12:34 PM
I'm quite tempted to ask why you'd want to do this. Most cases it's someone looking to revoke admin rights, not permanently grant them to all users.
That being said, I think the MakeMeAnAdmin script you found already has the answer within it. This line will convert the $currentUser to an admin:
/usr/sbin/dseditgroup -o edit -a $currentUser -t user admin
If you have more than one user to do this with per system, then you'll have to gather all the standard user accounts and put them in a list to loop over and run that command above on each one.