So I have this weird issue going on. I just implemented MacMule's script below to grab LDAP user info and import it in JSS. The script is running via a policy at Login/Logout, Ongoing. When a user signs into a device I want to see their User ID, Real Name, and email address. It seemed to be working at first but now when I log into one of the laptops it updates the email address and real name of every other device being managed. Only the username sticks. Not sure how to troubleshoot this.
#!/bin/sh
####################################################################################################
#
# More information: http://macmule.com/2014/05/04/submit-user-information-from-ad-into-the-jss-at-login-v2/
#
# GitRepo: https://github.com/macmule/SubmitUsernameAtReconForLDAPLookup
#
# License: http://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
sudo jamf recon -endUsername "$loggedInUser"
echo "Finished running recon for $loggedInUser `date`..."