Posted on 02-18-2014 01:59 PM
Since upgrading to Casper 9, I am not able to use my custom Mac Address Report that would list out what ever group I had selected with both Ethernet and Wifi Mac Addresses as well as name/serial number. Anyone have a way to do this, maybe with the API tie ins?
Gabe Shackney
Princeton Public Schools
Posted on 02-19-2014 05:09 AM
Jamf support provided this script for an extension attribute -
echo "<result>$(system_profiler SPAirPortDataType | awk '/MAC Address:/ {print $NF}')</result>"
Posted on 02-19-2014 05:43 AM
Do you know is this compatible with all versions of the system? I only ask since the part of the script lists AirPortDataType and I wondered if this got changed to WiFi.
Gabe Shackney
Princeton Public Schools
Posted on 02-19-2014 05:58 AM
All our Macs are running 10.9.x
Screenshot of Wireless MAC Address displayed in inventory -
http://note.io/1nNplWS
Posted on 02-19-2014 06:10 AM
Thanks for this it looks like its working perfectly!
Gabe Shackney
Princeton Public Schools
Posted on 02-19-2014 06:26 AM
Only because I hate using system_profiler because it's usually slower, and because there's nine ways to skin a cat:
#!/bin/sh
wifiPort=`networksetup -listallhardwareports | awk '/Hardware Port: Wi-Fi/,/Ethernet/' | awk 'NR==2' | cut -d " " -f 2`
macAddy=`networksetup -getmacaddress $wifiPort | awk {'print $3'}`
echo "<result>$macAddy</result>"
That will work for 10.7 and up.
Posted on 09-16-2014 01:19 AM
hi,
Could you help me with this problem, we have casper 9.1 and i need this option where i can print a report where the Wifi Address is showing. I really new on this, i just started to work on this. Is there a way that you can send me the script and steps how to do it.
Hope you can help me.
Thanks a lot
Posted on 09-17-2014 07:28 AM
@elosob if you take the script that @stevewood posted and go into JSS and create an extension attribute. This will run when computers checkin with JSS. Then you can create a smart group that will filter out information based on what you are looking for in the extension attribute.
So in a nutshell these are the steps:
1) Create extension attribute
a) Go to Computers>Management Settings>Extension Attributes
2) Create yourself an Extension attribute
a) make sure that it is set to Data Type: String and InputType:Script
3) Put the script from @stevewood in the box where the script should be.
4) Then go back to Computers
5) Create a smart group and name it whatever you want.
6) In the criteria, you will most likely have to hit all Criteria at the bottom.
7) Once you have selected your criteria being the name of the extension attribute you create, you need to set value.
8) If you want any value that is not null, you can select "not like" and leave the value empty, or you can set "is not" and leave the value empty.
9) Save the smart group, then you can click on View and you have your list.
This might take some time to populate since you just created the extension attribute.