See all Mac user login times in Casper/Jamf Pro

CCNapier
Contributor

Hi,

Is there a way to see a broad list of user logins reported to Casper for all devices?
I know I can go to a single device and see logins, but what if I want to see how many logins were in a lab, or across the site, between 10am and 11am this morning.

Is it possible?

Thanks

1 REPLY 1

lrabotteau
New Contributor III

Hello ,

You can maybe write and upload a script to your JSS with login trigger like that .

!/bin/bash

Hostname=$2
User=$3
Date=$(date)
ComputerName=$2
EthernetInterface=$(networksetup -listallhardwareports | grep 'Thunderbolt Ethernet' -A1 | grep -o en.)
MacAddress=$(ifconfig "${EthernetInterface}" | grep 'ether' | awk '{ print $2 }')
IpAddress=$(ifconfig | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}')
echo $MacAddress 'Login' $User $Date $Hostname $IpAddress >> /Users/Shared/$ComputerName
exit 0

But you have to specify maybe the same folder for overwrite on the same txt file.
I've never test on a shared drive