Tracking Username and IP Address in Active Directory

Tracking Username and IP Address in Active Directory

Tracking Username and IP Address in Active Directory

In a secure environment such as an organization, the resources being accessed by users must be tracked by the administrators from time to time. This helps in maintaining the security of an organization, as the administrators have a record of which user has logged on or has accessed a particular resource. This process is referred to as auditing. This can be done to track the logon, logoff, or other similar activities of users. The following sections describe how to find which user has logged on and also find the IP address from which they logged on.

Tracking user logon events using Active Directory Security Logs

The server administrator can use the Active Directory security logs to keep track of the users who logged in, see when they logged and what files were accessed. The user logon information can be collected in the domain controller logs by enabling the audit policy for the user logon events. This involves applying the Audit Logon policy to Active Directory objects and tracking logon events using Event Viewer.

The Audit Logon policy can be applied using the following steps.
  1. Open the Group Policy Management Console by navigating to Start and typing gpmc.msc.
  2. From the Group Policy Management Console, select the Default Domain Policy option and navigate to Computer Configuration > Policies > Windows Settings > Security Settings > Advanced Audit Policy Configuration > Audit Policies > Logon/Logoff.
  3. Enable the Audit Logon and Audit Other Logon/Logoff policies.
  4. Double click on Audit Logon. This opens its properties.
  5. Click on the Configure the following audit events checkbox.
  6. Click on the Success and Failure checkboxes to audit both the successful and failed events in the security log.
  7. Click on Apply and then OK.
  8. The same steps are to be repeated for the Audit Other Logon/Logoff Events.
  9. Close the Group Policy Management Editor and in the GPMC, select the Group Policy Object that was modified.
  10. Navigate to the Security Filtering section and select Add and Everyone and close the GPMC. This applies the policy to all the objects in Active Directory.
To update the group policies, run the gpupdate /force command in Command Prompt.

The Windows Event Viewer is an administrative tool that helps to keep track of events, errors, and other important messages. The information is stored in a series of logs called the Event logs. There are five different types of events that may be logged namely Information, Warning, Error, Success Audit, and Failure Audit.

Once the audit policies have been configured, the logon activities can be tracked using the Event Viewer. This can be done using the following steps.
  1. Click on Start and select Administrative Tools > Event Viewer.
  2. Navigate to Windows logs > Security.
  3. From the right pane, open Filter Current Log and set filters for the appropriate event IDs. Event ID 4624 indicates a successful login by the user, while 4647 indicates a successful logoff. Event 4648 is generated when a process explicitly specifies the credentials of an account and attempts a logon. Double click on this event to access the Event Properties.
  4. In the Account Logon category, right-click on the Success Audit log and select Open. This displays the username that logged on, including the date and time of occurrence. The Client Address specifies the IP address of the user.

Tracking User Logon Events using PowerShell

The Get-Eventlog PowerShell cmdlet can be used to get all the events from the event log of the domain controller and filtering them by their Event IDs. This also displays information such as the time and computer that was used for the event. 
    • Related Articles

    • Active Directory User properties – Address tab

      The address tab of the user properties window allows you to configure a set of attributes that describe the user’s physical location for contact purposes. Label LDAP Name Example as in the figure Street streetAddress park street P.O.box postOfficeBox ...
    • DNS and Active Directory

      Domain Name System (DNS) is a name resolution method that is used to resolve host names to IP addresses. It is used on TCP/IP networks and across the internet. DNS is a namespace. Active Directory is built on DNS. DNS namespace is used internet wide ...
    • Framework of Active Directory

      The Active Directory structure is built on the domain level. The framework that holds the objects can be viewed at different levels namely forest, domain trees and domains. At the top of the level is the forest. A forest holds all the Active ...
    • Active Directory Objects

      Real-world entities such as users, computers are represented as objects in Active Directory. Objects are the fulcrum for the very existence of Active Directory. One important aspect with respect to object characteristics is that some of the objects ...
    • Active Directory Objects List

      Objects are the fulcrum of Active Directory. The ease of an organization’s resource management comes from the fact that objects give AD a modular structure. Introduction The individual components of an organization’s network are called objects in ...