#!/bin/bash # admin-user-create.sh # Inserts the specified user into the local admin group if [[ $# == 1 ]] ; then sudo dscl localhost merge /NetInfo/Groups/admin Member $1 && echo "Successfully added ${1} to the \"admin\" group." else echo echo " To insert a user into the local admin group:" echo " sudo dscl localhost merge /NetInfo/Groups/admin Member " echo fi exit 0