Set user as local admin on MacOS through Jamf?

okoye11
New Contributor

My company sent me a MacBook to do some application testing on, but I initially couldn't login to it. I had to reset the device and let it re-enroll in our Jamf cloud before I could login to it.

I can login as a standard user now. These are not domain joined and there is no local admin account right now.

I am a Jamf administrator, but I've never used it. I went and created a new policy that targets only my computer that was supposed to create a new local account with administrator privileges, but it doesn't appear to have worked.

Any suggestions?

2 REPLIES 2

A_Collins
New Contributor III

I am not sure why that does not work unless you provide the outcome of the policy. However, you can make yourself admin

Create a script below in Jamf pro and scope this to yourself or put in self service. that would make the logged in user admin.

 

#!/bin/bash

loggedInUser=$(stat -f %Su /dev/console)

dseditgroup -o edit -a $loggedInUser -t user admin

 

AJPinto
Honored Contributor II

It is not possible to setup macOS without at least one local admin account. Check to see if you have an account being created with your prestage and use that account for your troubleshooting. 

 

For the policy to make a new admin account. What are the logs saying? Is it making the account and not granting admin access, or not making the account at all?

 

You can also use JAMF to promote your account to an Admin by adding it to the Admin group, but @A_Collins already covered that.