I have the following scripts that updates jamf username and fullname in jamf backend
#! /bin/bash
sudo jamf recon -endUsername $3
#Discover last logged in username
lastUser=`defaults read /Library/Preferences/com.apple.loginwindow lastUserName`
# Get the Full Name of the last logged in user
fullName=$(dscl . read /Users/$lastUser RealName | grep -v RealName | cut -c 2-)
# Add the users full name to the computer record in the JSS
jamf recon -realname "$fullName"
exit 0
The issue is that first when this scripts has been running a config profile must be pushed out. Right now the config profile runs first before the scripts has made it
Maybe I am thinking to technical instead of going for the easy way - but do any have some input have this can be solved

