User & Location Fields

New Contributor III

Hello all

Is there a way to set a policy to repopulate AD info from the last user field? Would like to send emails to users but some are incorrect or do not exist. We have a new LDAP server since then so we now new machines have no identification except in the last user field.


Valued Contributor II

We run this as a policy once a day to grab the last logged in user. It does an effective job of adding those details for us.


lastUser=$(defaults read /Library/Preferences/ lastUserName)
jamf recon -endUsername "$lastUser"

Or we you looking for something different?