Recon not collecting user and location information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 03-20-2014 06:57 AM
JSS 9.2 on 10.9.2, server 3.0.3
Under "Computer Inventory Collection" settings in JSS, the "Collect user and location information from LDAP" box is checked, but this information is not showing up under "User and Location" on a computer inventory screen. Neither ```
jamf recon -endUsername <username>nor
jamf recon -userID <userid>
``` populate the data either. Seemingly, the only way to populate this data is to edit the user and location data from the JSS page. I can successfully enter an AD username and pull the rest of the data from the directory.
The server was upgraded from 10.7.5 to 10.9.2 earlier last week, it appears the problem started after the 10.9.2 upgrade. Due to change management restrictions, I can't upgrade JSS to the current version until the 2nd week of April. Has anyone run into this?
Thanks much!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 03-22-2014 06:04 AM
Hey Berrier,
That's odd because I know I've used the "sudo jamf recon -endUsername <username>" option before. Here is the script I use:
#!/bin/sh
# Grab the username of the user that last logged in (current user).
currentUser=`defaults read /Library/Preferences/com.apple.loginwindow lastUserName`
# Submit an inventory report and include the current user (above) to be written to the
# username field in User and Location Information.
jamf recon -endUsername $currentUser
exit 0
Couple this with the computer inventory collection setting you mentioned and things *should* work. Note though that the above script will populate that field, but not search against it. That won't happen until the next inventory update. That setting to "Collect user and location information from LDAP" requires the field already be populated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 03-23-2014 02:06 PM
I ran into something like this before, but it was because we had two LDAP servers configured, and the JSS doesn't have a way to set the default LDAP server.
What I had to do was to specify what LDAP server to use in the recon and then it started to pull the information automatically (as it should).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-21-2014 08:24 PM
@ctangora that's great, what's the syntax to specify the ldap server to use in a recon?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 07-22-2014 07:23 AM
jamf recon -ldapServerID 1
you can see the LDAP server ID in the path when you go and edit one of your LDAP servers.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 02-28-2019 11:18 AM
Started having this issue occur on Jamf Pro 10.7, no idea why. Adding this script to my recon policy with a "before" priority fixed the issue.
