Looking to script making all Standard users Admin

vbrown
New Contributor

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

1 ACCEPTED SOLUTION

mm2270
Legendary Contributor III

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.

View solution in original post

1 REPLY 1

mm2270
Legendary Contributor III

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.