Hello all,
I'm seeing an odd thing in our inventory in JSS (v9.9.2) where some Macs will show root as the current User and a completely random name in the Full Name field. The name will show up for all the Macs that are showing with the User root. I can't seem to make heads or tails of why some Macs start reporting this. Today there are 22 Macs showing up this way (image attached).
We do have a Last User extension attribute enabled:
#!/bin/sh
lastUser=`defaults read /Library/Preferences/com.apple.loginwindow lastUserName`
if [ $lastUser == "" ]; then
echo "<result>No logins</result>"
else
echo "<result>$lastUser</result>"
fi
As well (and I suspect this is where it's going a bit wrong), we are auto-populating the Full Name field by pulling the current user. Here's the script from JAMF Nation we are using:
#!/bin/sh
sleep 5
loggedInUser=$( ls -la /dev/console | cut -d " " -f 4 )
/usr/local/bin/jamf recon -endUsername $loggedInUser
exit 0
I've seen some other discussions where having multiple users logged in via Fast User Switching can cause issues, but we have that disabled on most Macs.
Thanks for any suggestions!