Last user checks against LDAP to fill in fields

ImAMacGuy
Valued Contributor II

I need to find a way to populate the last logged in user's info - I can do it manually by editing each entry in the JSS, and clicking the magnifying glass then selecting the correct entry, but is there a way to automate that?

2 REPLIES 2

senate
New Contributor

Yes you can. You can use a script that uses dscl to look up the attributes (display name, account name, email address, position etc) from your LDAP service. Use the recon handlers to set those results to the inventory attributes (-endusername, -realname, -email, -position). Then run the script as a policy.

bentoms
Release Candidate Programs Tester

Some scripts are given in this old thread, https://jamfnation.jamfsoftware.com/discussion.html?id=3607