User and Location

New Contributor


In our organisation we have enrolled almost 1500 machines using Network Scanner from Jamf Recon app. For all those machines when we do the inventory search we don't find any information in User and Location, But when we Enroll using URL or Enrollment Invitations we are able to see the User details in User and Location(Details are fetched from AD). Yes I know that when we use Jamf Recon app we need to enter the User and Location details manually. One way I can make the changes accordingly is by seeing the Last User I can go to User and Locations Click on Edit and Enter the Last user name and click search, Which will list the user details and then I can save the details. But it is difficult to do the same manually for all the machines. Can any one pls let me know is there any other way for me to do this. 87b4f311363e4d6688572b3920ab19f2


Valued Contributor

Might be able to do a API call to update this info based on the local user accounts.

Legendary Contributor II

The API could work, but it may be easier to just use a simple script to determine the primary username and then do a lookup against AD for their details, store those in variables (assuming it finds them), and pipe them back into a jamf recon command. I.e, like:

/usr/local/bin/jamf recon -endUsername <username> -realname <full name> -position <position string>


The above would update those user and location details with the strings passed to the flags in the recon command. Run a 'jamf help recon` in Terminal to see all the possible flags for it.

Note that the above assumes the Macs are joined to AD and can do a simple dscl search against AD. If not, you would have to use something like ldapsearch which gets a little more complicated to use. Or you could just pull the local user account details with dscl and be ok with whatever it finds.


@mm2270 I used to have this working and noticed lately that it's no longer working. I just tried this:

sudo /usr/local/bin/jamf recon -endUsername myUserID ldapServerID 1

I'm not sure what's going on.