Skip to main content
Question

JSS Inventory Location Information

  • March 9, 2010
  • 3 replies
  • 12 views

ImAMacGuy
Forum|alt.badge.img+23

I was browsing the location information from the JSS (via smart group)
and noticed the only information there was the Building information. I
verified under Settings --> Inventory Options --> Inventory Preferences
--> Location that Username, Real Name, Email Address, Dept, Bldg, and
Phone are all "Required" and Live LDAP Lookups is "Default".

Is there a way to get this information to populate?

John Wojda

Operations Engineer, CTS

3333 Beverly Rd. B2-338B

Hoffman Estates, IL 60179

Phone: (847)286-7855

SMS / Text Page: 2245873298
<mailto:12245873298 at messaging.sprintpcs.com>

Team Lead: Chris Sta Ana
<mailto:cstaana at searshc.com;jwojda at searshc.com?subject=John%20Wojda%20Fe
edback&body=I%20am%20contacting%20you%20regarding%20John%20Wojda.>

3 replies

Forum|alt.badge.img+31
  • Honored Contributor
  • March 9, 2010

John

Yup, in the recon command in /usr/sbin/jamf there are switches to
populate those categories into inventory. I am going to write up some
advanced inventory scripts soon that do such things and post them on my
site. You'll want to pull that information out in a script and then use
recon to populate it.


Forum|alt.badge.img+31
  • Honored Contributor
  • March 9, 2010

Here is the rough draft script I am working on, I do not quite know how
Open Directory stores certain attributes for a user in plist form as I
am still figuring that out. Please add and repost or send back to me
whatever you find useful

#!/bin/bash

################################# # advanced inventory script to populate JSS data via recon command # # set variables here that you wish recon to populate # Note this requires the Casper Suite # # USE AT YOUR OWN RISK, NO WARRANTY PROVIDED # by Thomas Larkin # http://tlarkin.com # # This is rough draft, version 0.1 ##################################

# this is designed to run as a log in hook # this assumes the short name is also the email name

# depending on how you configure your user names you may need to alter
the script

RealName=`/usr/bin/dscl . read /Users/$3 | /usr/bin/awk '/RealName/ {
print $2 $3 }'`

ShortName=`/usr/bin/dscl . read /Users/$3 | /usr/bin/awk '/RecordName/ {
print $2 }'`

email="@mycompany.com"

# now recon the info into the jss

/usr/bin/jamf recon -realname $RealName -endUsername $ShortName -email
$3$email

exit 0


Forum|alt.badge.img+31
  • Honored Contributor
  • March 10, 2010

I just wanted to give you guys an update. When I run the recon script
to add the user name, long name and email address to that machine, it
allows me to actually do inventory searches for that user since it is
now tied to that asset in inventory. This is very valuable for anyone
who works in a 1:1 as I can do a search for "tlarkin" and it will pull
up the machine I am logging into in an inventory search.

Now, one caveat I see off the bat is, if the machine gets swapped out or
the wrong user logs into the machine it will add the wrong user. However, having this as log in hook, when first handing out machines
could be valuable. I have also added my LDAP server and sure enough the
LDAP users and groups show up in the machine's info when I pull it up in
inventory. However, I cannot do an inventory search for a user name or
a full name and pull up what machine they are logging into.

Also, on another side note, if you search by user name in the usage logs
it will pull up every machine that user has ever logged into while on
your network. I have used it in the past to figure out where a missing
laptop may be.

Just FYI

-Tom