Skip to main content
Question

Jamf Pro Script

  • September 19, 2024
  • 8 replies
  • 1 view

JamfAdmin2
Forum|alt.badge.img+6

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. 

8 replies

AJPinto
Forum|alt.badge.img+26
  • Legendary Contributor
  • 2717 replies
  • September 19, 2024

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.


YanW
Forum|alt.badge.img+11
  • Contributor
  • 180 replies
  • September 20, 2024

Do you mean this?

#!/bin/sh loggedInUser=$(stat -f%Su /dev/console) jamf recon -endUsername $loggedInUser

JamfAdmin2
Forum|alt.badge.img+6
  • Author
  • Contributor
  • 59 replies
  • September 20, 2024
YanW wrote:

Do you mean this?

#!/bin/sh loggedInUser=$(stat -f%Su /dev/console) jamf recon -endUsername $loggedInUser

I would pretty much need the script to auto fill all of this user info within user and location:

 

Username:
Full Name:
Email Address:
Position:
Department:

YanW
Forum|alt.badge.img+11
  • Contributor
  • 180 replies
  • September 20, 2024
JamfAdmin2 wrote:

I would pretty much need the script to auto fill all of this user info within user and location:

 

Username:
Full Name:
Email Address:
Position:
Department:

yea, maybe try it first


JamfAdmin2
Forum|alt.badge.img+6
  • Author
  • Contributor
  • 59 replies
  • September 20, 2024
YanW wrote:

yea, maybe try it first


It was completed but no changes happended

 


YanW
Forum|alt.badge.img+11
  • Contributor
  • 180 replies
  • September 20, 2024
JamfAdmin2 wrote:

It was completed but no changes happended

 


update inventory


Jason33
Forum|alt.badge.img+13
  • Honored Contributor
  • 223 replies
  • September 20, 2024

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.

 


Forum|alt.badge.img+4
  • New Contributor
  • 7 replies
  • September 20, 2024

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.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings