Skip to main content
Solved

Looking to script making all Standard users Admin

  • January 25, 2022
  • 1 reply
  • 0 views

Forum|alt.badge.img+2

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

Best answer by mm2270

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 original
Did this topic help you find an answer to your question?

mm2270
Forum|alt.badge.img+16
  • Legendary Contributor
  • January 25, 2022

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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings