Skip to main content
Question

User & Location Fields

  • February 10, 2017
  • 1 reply
  • 8 views

Forum|alt.badge.img+4

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.

1 reply

easyedc
Forum|alt.badge.img+16
  • Esteemed Contributor
  • February 10, 2017

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?