Posted on 08-24-2016 12:18 AM
Before I'm inventing something that already exists... We'd like to create a self service item for our first line support which enables them to create a local user account on a device bij just one click.
Posted on 08-24-2016 02:14 AM
@DeployAdam Why not a policy to create he admin account?
Or is this say, promoting users to admins?
Posted on 08-24-2016 08:15 AM
This is to make a user (them self) a local admin, it does not ask which user, it just give access to any account that is logged in, and of course it does it from the Self Service app.
this is the link where I got it from: https://github.com/kitzy/makeAdminUser/blob/master/makeAdminUser.sh
so create the script in your JSS, than a policy to make it available in self service.
kudos to: John Kitzmiller.
if [ -z $3 ];
then
currentUser=stat -f '%Su' /dev/console
else
currentUser=$3
fi
dseditgroup -o edit -a $currentUser -t user admin
if [ "$?" == "0" ];
then
echo "Successfully added $currentUser to admin group"
else
echo "ERROR: Unable to add $currentUser to admin group"
exit 1
fi
exit 0