Windows 2000 WHOAMI Command Line Tool Explained

This article provides an overview of the WHOAMI command-line tool included in the Microsoft Windows 2000 Support Tools. It details the utility's primary function, explains how administrators use it to inspect access tokens, and outlines the standard syntax and options available for troubleshooting user identities and security privileges on a Windows 2000 system.

Primary Function of WHOAMI

The whoami utility is a diagnostic command-line tool designed to return the domain name, user name, security identifiers (SIDs), and security privileges associated with the currently logged-on user. While later versions of Windows included whoami as a native operating system component, in Windows 2000 it was provided as part of the optional Support Tools package located in the \Support\Tools directory on the Windows 2000 installation media.

The primary purpose of the tool is to inspect the caller's access token without requiring access to graphical management consoles. When a user logs in, Windows generates an access token containing the user's security identity, group memberships, and assigned privileges. The whoami tool reads and displays this token data, making it essential for diagnosing permission issues, Active Directory group membership propagation, and access control list (ACL) failures.

Key Capabilities and Parameters

Running whoami without any parameters simply returns the domain and username in the format Domain\Username. For detailed troubleshooting, the Windows 2000 version supports several specific switches:

  • whoami /user: Displays the current user account name alongside the user's unique Security Identifier (SID).
  • whoami /groups: Lists all security groups the current user belongs to, including the group names, group types, and their respective SIDs. This is particularly useful for verifying whether a user has received permissions from nested Active Directory groups.
  • whoami /priv: Lists all security privileges assigned to the user account (such as the ability to shut down the system, take ownership of files, or backup files and directories) and indicates whether each privilege is currently enabled or disabled.
  • whoami /all: Displays all available identity data in a single output, combining the user information, group memberships, and security privileges.

Administrative Use Cases

System administrators primarily use the Windows 2000 whoami tool to verify the effective permissions of an active logon session. Because group membership changes in Windows 2000 do not take effect until a user logs off and logs back in, running whoami /groups allows administrators to quickly confirm whether an updated token has taken effect. It is also commonly used in logon scripts and batch files to determine the context under which an automated task or service is running.