SCRIPT | Management-Update-User-Information

Update User Information

Summary

This script updates the assigned user in Jamf Pro based off who is logged in.


Script Content

#!/bin/zsh

# Get the logged in users username
loggedInUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`

echo "Running recon for $loggedInUser `date`..."
sudo jamf recon -endUsername $loggedInUser
echo "Finished running recon for $loggedInUser `date`..."

Concluding Comments

This task will assist with maintaining accurate records within Jamf Pro of which Mac is assigned to which user.