I need to create new attribute named:
LastLoggedWorkstation
This attribute should contain the name of the last machine\IP from which the user logged on.
I know how to add new attribute to AD schema (here) but I don't know how to add logic.
When a user logon to a machine in the DC an event 4768 is being generated (from MSDN).
This event contains the sid of the user and the ip address of the machine from which he logged on.
If I could edit the attribute that whenever there is a logon, check the source machine and add it to the attribute, it would be great.
Is it possible or the attributes can't contain any logic ?
Reference:
https://social.technet.microsoft.com/Forums/windows/en-US/e545548b-2c48-4dd5-9c23-ef25c56050a7/last-workstation-user-logon?forum=winserverDS
Best way to find the computer a user last logged on from?