Skip to main content

I began a thread a while ago but I can't access my old post. When I view in the inventory page in our JSS web portal I see the following columns.

computer name | Managed | OS | IP | Model | Serial number

Now, I've added the following columns: Username | Real Name | Email Address the problem is these 3 fields are blank for all machines.

I installed MySQL and I opened up the Jamfsoftware DB. I navigated down to the USERS Table. I returned all rows for USERNAME and the only names it returns are the ID's defined within the JSS web portal. (SettingsAccountsaccounts and groups)

So it does not appear there are any user names being collected by the JSS inventory. Also, under "Inventory Collectoin PreferencesAccounts" We have the following selected.

Collection Accounts "yes"
Include Hidden Accounts "yes"

So how do we get the user name? Or at the very least the "last logged on user" of each Mac?

+1 for seeing problems using $3.

Someone at jamf suggested this (can't remember who to pass credit).

if [ -z $3 ]; then currentUser=`stat -f '%Su' /dev/console`; else currentUser=$3; fi; jamf recon -endUsername $currentUser

Can add this to the execute command section of policy, it's nice because you can run it outside of login.