Hello All,
Our machines are all mobile accounts vs local accounts.
we have 1 local account that we want to retain admin access for, but all other mobile accounts and local accounts need to be standard accounts.
ive read some of the other threads and tried their options but i believe them to be for local - tested here and a user could install an app without IT intervention.
We arent tied in to AD, so we cant use their info.
the only tie-in to AD is a script that gets run to get their info from AD , but its not constant no live.
bonus points for a script that allows temporary access for execs/named individuals
below is the tested script, that doesnt work.
!/bin/sh
IFS=$' ' declare -a localusers=($(dscl . list /Users UniqueID | grep -v namedadminaccount | awk '$2 >= 500 && $2 < 1000 {print $1}')) unset IFS
for i in "${localusers[@]}" do /usr/sbin/dseditgroup -o edit -n /Local/Default -d $i -t "user" "admin" done
EDIT: is this broken becase dscl needs LDAP binding?!?!