Where windows stores its password?

1. SAM database(Security Account Manager)


2. NTDS.dit

NTDS stands for NT Directory Services
DIT stands for Directory Information Tree

Location of NTDS.dit

By default:
C:\Windows\NTDS\NTDS.dit

This file is only present on Domain Controllers, not on client machines or member servers.

What’s Inside NTDS.dit?

It uses a Jet Blue (Extensible Storage Engine - ESE) database format and includes:

  1. Schema Partition – definitions for all object types (users, computers, etc.)
  2. Configuration Partition – configuration info for AD forest
  3. Domain Partition – all domain-specific objects (users, groups, etc.)
  4. Application Partitions – optional partitions for storing custom data (e.g., DNS data)

Summary

Important

When a machine is joined to an Active Directory domain, the SAM database still exists, but:

  • It only manages local accounts on that individual machine.

  • Domain accounts (users, groups, computers) are managed by Active Directory, which stores data in the NTDS.dit database on a Domain Controller.

Difference between the two

SAM (Local) Active Directory (NTDS.dit)
Manages local users & groups Manages domain users, computers, groups
Limited to one machine Centralized across the domain
NTLM authentication Kerberos + NTLM