Where is the Windows XP file containing your password stored?

The password is stored in SAM, security accounts manager, which is run off/part of the system registry and is not accessible during operation of the system using the registry.

Usually the files are:

For restarting windows:C:\WINDOWS\RUNDLL.EXE user.exe,exitwindowsexecFor Windowsshutdown:C:\WINDOWS\RUNDLL32.EXE user,exitwindows

More OS specific commands can be found below,

Information for deleting SAM files:

In Windows NT / 2000 / XP, system uses SAM(Security Account Manager) to manage the safety of user account.SAM uses Security Identifier to perform Account management. The Security Identifier was created with the user account, and once you delete the user account, the SID will be deleted at the same time. One SID with only one account even if the same user name created in different time will with different SID. Therefore, once an account is reconstructed, it will be given a different SID, and won't keep the original jurisdiction. SAM perform with %System Root % system32configsam file. This file is a Windows NT / 2000 / XP user account database, all user name and password and related information can be stored in this file.