User & Location Fields

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
02-10-2017
10:03 AM
- last edited on
03-04-2025
05:27 AM
by
kh-richa_mig
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.
- Labels:
-
Jamf Pro
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 02-10-2017 12:10 PM
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.
#!/bin/sh
lastUser=$(defaults read /Library/Preferences/com.apple.loginwindow lastUserName)
jamf recon -endUsername "$lastUser"
Or we you looking for something different?
