Skip to main content
Jamf Nation, hosted by Jamf, is the largest Apple IT management community in the world. Dialog with your fellow IT professionals, gain insight about Apple device deployments, share best practices and bounce ideas off each other. Join the conversation.

Create accounts when adding to DEP w/o LDAP or AD?

We don't use LDAP. Is there a way for me to include info on the CSV file I'm uploading to add new Mac laptops in DEP/Apple School Manager so that both my admin account and a specific user account are created and tied to a specific serial number?

Like Comment
SOLVED Posted: by FrozenWaltDisney

You could do this be creating multiple PreStage enrollments. This would also allow you to tie the order number directly to the computer. To make the account, you could make a bash script to pull the user account from the API and create a user with that same user ID.

Here is an example of a API pull that I used, you can replace the tag with the appropriate field. That field you can find by going to ""

Make sure you make an API account with read only access to the sections you want to be read.

This is a snippet from one that will automatically rename computers to fit a specific naming convention. Currently it's setup to read the JAMF ID number of the computer.


MACADDRESS=$(networksetup -getmacaddress en0 | awk '{ print $3 }')

XML=$(curl -k $JSS/JSSResource/computers/macaddress/$MACADDRESS --user $API_USER:$API_PASS )

##Find ID
#String to search
#Find Position in string
#Find length of search variable
#Start after Tag
#Terminate string Length
IDFPOST=`echo "$STRLNGT + $IDPOSNUM + 10" | bc`
#Grab String and cut excess
ID=`echo ${XML:$IDFPOS:$IDFPOST} | cut -d "<" -f 1`

When you reformat the computer, just make sure you "flush" all the commands, and when you setup the account again it will grab the previous JAMF settings. Although with using the pre-stage you could probably delete the account and it will just redo the whole process regardless.

Hope that helps. The bash script is more of a start then a full solution.