We grant admin rights via a script / policy that runs this script...
#!/bin/bash
#
# this script will promote all local users to the admin group
#
for i in `/bin/ls /Users | /usr/bin/grep -v "^Shared"` ; do
/usr/bin/dscl . append /Groups/admin GroupMembership $i
/bin/echo "done"
done
#
# now to test what we did
local_accounts=`/bin/ls /Users | /usr/bin/grep -v "^Shared"`
check_admin=`/usr/bin/dscl . read /Groups/admin GroupMembership | /usr/bin/grep "$i" -c`
#
# now run a loop to check our work
#
for i in $local_accounts ; do
if [ $check_admin -eq 1 ]
then /bin/echo "$i is an admin account"
else /bin/echo "$i is not an admin account"
fi
done
exit 0
what we are finding is that if a user goes home or anywhere not on teh corporate network, they loose their admin rights. It's been like this for a while, just now getting around to looking at it.
