Posted on 09-19-2024 08:50 AM
Hello,
Does anyone out there have a script in Jamf I can use that can auto fill the "Update user and location" section. I need it to work for computers that are being setup and deployed for the first time as well as computers that have already been deployed and are current.
09-19-2024 01:21 PM - edited 09-19-2024 01:21 PM
If you require people to enter credentials to enroll, Jamf will automatically assign the device to whoever enrolls it. Devices can also be assigned with recon, but I would have to dig up the verb (for example have a function to see the userID of the logged in user, and pipe that in to recon to assign the device to that person).
You will want cloud identity or LDAP setup to actually pull in the correct information beyond the users name.
Posted on 09-20-2024 06:47 AM
Do you mean this?
#!/bin/sh
loggedInUser=$(stat -f%Su /dev/console)
jamf recon -endUsername $loggedInUser
Posted on 09-20-2024 06:51 AM
I would pretty much need the script to auto fill all of this user info within user and location:
Posted on 09-20-2024 07:05 AM
yea, maybe try it first
Posted on 09-20-2024 07:35 AM
It was completed but no changes happended
Posted on 09-20-2024 07:58 AM
update inventory
09-20-2024 09:43 AM - edited 09-20-2024 09:46 AM
Arent those fields populated by LDAP mappings? Do you have an LDAP server integrated with your Jamf instance? If not, start there. You'll also want to go in to Settings - Computer Management - Inventory Collection and make sure to check 'Collect user and location information from Directory Service'. When a recon is completed, that info should update, if its not already.
And one more thing...check your PreStage and confirm in Account Settings that 'Pre-fill Primary Account Information' is checked. That might help out as well.
Posted on 09-20-2024 12:10 PM
It might be more than what you need, but I suggest you look at SYM. https://snelson.us/2024/06/setup-your-mac-1-15-0-with-sym-helper-1-2-0-via-swiftdialog-2-5-0/ It streamlines the onboarding process for devices.