advanced inventory searches not displaying user name

tlarkin
Honored Contributor

I am trying to run a series of reports in Casper Inventory that sort the laptops in my deployment by last check in date, and anything that has not checked in to the JSS in over 4 weeks. The report works fine, but it fails to add in the user's short name or long name. I would really like this to work since I can just generate this report and hand it off to someone in administration and they can make sure these laptops are still here.

I know some students come to school and turn their airport connection off, on purpose, because they know that we use remote desktop and push out updates over the network. Other machines are off site at the repair center. However, I would love a way to audit everything off my notes and off of my records for repair.

I also have some machines that have not checked in for a whole year, now these machines I think had a major component replaced and/or the asset tag replaced and it is in inventory as a different machine.

Any way to make it so the short name and the full name show up in my reports? Right now the category is there in my report but the report shows a blank field.

Also, how are you all using advanced searches in inventory? I used to use smart groups, but too many smart groups hurts performance of the JSS database, so I switched what I cold over to advanced searches.

Thanks

Tom

14 REPLIES 14

FreePMS
New Contributor

Pardon my bumping a four-year-old question, but it was never answered and it's the question I have now. What do you have to do to get the username field(s) to auto-populate in inventory? They're blank in both my smart groups and my advanced searches. JSS 9.11, over 900 machines so I'm not going to go through them one at a time to update them.

bentoms
Release Candidate Programs Tester

@FreePMS how clean is your AD?

You can either do this via a script or through the JSS (if your AD is clean & tidy).

FreePMS
New Contributor

I wouldn't know how to critique the cleanliness of an AD. I have set up the connection to the JSS, though, and it tests good. I'm asking about queries to the JSS, which our asset management team wants to use.

mm2270
Legendary Contributor III

I think what @bentoms][/url is getting at is that its possible using built in items in the JSS to have the JSS pull the usernames from AD for the person that's using any Mac.
You can also script it as he noted. In either case you would get the username populated in the Location section of each Mac, as well as Full Name, Email Address, etc.

Alternatively, you could always set up the "Last User" Extension Attribute from the built in templates. This isn't going to be as accurate as pulling it from AD, but it will work to get the last logged in user. Keep in mind it will only get the username, not Full Name, Email address, etc.
With JSS version 8.x you couldn't add an EA column into the Smart Groups view. I'm not sure if its possible now with 9. But in either version you can add that column into any Advanced Search reports.

FreePMS
New Contributor

Using built in items in the JSS to have the JSS pull the usernames from AD is *exactly* what I want to do. What are the steps to cause it to do that?

bentoms
Release Candidate Programs Tester

@FreePMS if your LDAP lookups in the JSS are working fine.

Then you could run the below @ login;

sudo JAMF recon $3

You'll also need to tick something like "update location data" (can't remember).

Which version of the JSS btw?

mm2270
Legendary Contributor III

Not sure of the wording or exact location under JSS 9.11, but in JSS 8.x its called "Populate the computer location information of a username from an LDAP lookup on inventory update" and is under Inventory Collection Preferences > Location.

I don't know if there's something else that needs to be set to do that, well, other than the LDAP lookups working properly.
I seem to recall that the username field needs to be already populated with something for this to work? Am I imagining that?

FreePMS
New Contributor

@bentoms

JSS 9.11

Do you mean have all the client machines run that at login? as a login hook? And if not, then where?

FreePMS
New Contributor

@mm2270 That was the clue I needed. Found the tick box! Now we'll see if the data commences to flow.

bentoms
Release Candidate Programs Tester

@FreePMS run it as a policy at login.

@mm2270, that's it. Tick that & run the command:

sudo jamf recon $3

FreePMS
New Contributor

Still no joy. The "Last User" Extension Attribute works, but still no data flowing in from AD. Raised a support ticket with JAMF even, and it's still not working. To reiterate, all tests work just fine in the LDAP, but all the fields that should be populating from there remain blank in both searches and smart groups, after ensuring that inventory collection box is ticked and running the recon from Recon.

Further assistance solicited.

mm2270
Legendary Contributor III

@FreePMS][/url I could swear that I recall that when this feature was introduced, it required that the username field at a minimum was populated in the computer record. Then, once recon ran on it, it would use that short username and do the LDAP lookup for all the other information that was appropriately mapped and plug it into the record. I may be mis-remembering that, but that seems to stick in my head for some reason.
Can you, or have you tried, adding in one or two usernames to some test Macs and then running Inventory collection on them to see what happens?

Has JAMF made any additional recommendations about this?

bjohnson
New Contributor

https://jamfnation.jamfsoftware.com/discussion.html?id=6019

This should help.

mm2270
Legendary Contributor III

@bjohnson Thanks! That's what I was remembering. The post from @Joel.Peasley specifically spells out what needs to happen to make it all work-
https://jamfnation.jamfsoftware.com/discussion.html?id=6019#responseChild31404