Skip to content

Instantly share code, notes, and snippets.

@macmule
Created November 28, 2021 21:07
Show Gist options
  • Save macmule/472066b9347d08b396ef088754e0b951 to your computer and use it in GitHub Desktop.
Save macmule/472066b9347d08b396ef088754e0b951 to your computer and use it in GitHub Desktop.
#!/bin/sh
####################################################################################################
#
# License: https://macmule.com/license/
#
####################################################################################################
# Get the logged in users username
loggedInUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`
echo "Running recon for $loggedInUser `date`..."
# Run recon, submitting the users username which as of 8.61+ can then perform an LDAP lookup
jamf recon -endUsername $loggedInUser
echo "Finished running recon for $loggedInUser `date`..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment