Frequently Asked Questions

« Previous
How to connect with VPN using AnyConnect in macOS?
Next »
How do I exclude folders in the anti-virus scan?

windows ubuntu macos xibo network zenworks android storage

71. How do I make all users local administrators on macOS?

Local administrator to all users

This method has been tested in macOS 10.13.

Create a file /usr/local/sbin/ with this content:

#!/bin/bash # List all users dscl . list /Users | grep -v '^_.*\|daemon\|root\|nobody\|administrator' | while read localUser do # For each user, add local users to the computers local admin group dseditgroup -o edit -a $localUser -t user admin done

Make it executable:

# chmod +x /usr/local/sbin/

Create a LauchDaemon with the name /Library/LaunchDaemons/se.uu.makelocalusersadmin.plist with this content:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ""> <plist version="1.0"> <dict> <key>Label</key> <string>se.uu.makelocalusersadmin</string> <key>Program</key> <string>/usr/local/sbin/</string> <key>RunAtLoad</key> <true/> </dict> </plist>

Give all users sudo privileges

To get all users sudo access without also getting local computer administrator access then add the following to the file /etc/sudoers.d/make.all.users.root



This entry mac.all.admin was last modified 2018-12-19


This documentation is covered by GNU Free Documentation License. 14 ms