After a server crash of a domain controller I attempted to run the chkdsk utility from the Recovery Console. I quickly realized I didn’t know the local Administrator password for the server. I was about to grab for a copy of Petter Nordahl-Hagen’s handy “Offline NT Password & Registry Editor” disc, but decided to try changing the password in Windows first (since I did know the password of a Domain Administrator).
So how do you do that on a domain controller exactly? You can’t. Well, kind of. See, the Active Directory database replaces the local user database, so you can’t use the “Local Users and Groups” MMC Snap-in (or so I’m told). The Directory Services Restore Mode (DSRM) Administrator password fills the void where you’d normally need a local administrator password, for example when using the Recovery Console.
There are some weird commands to know to accomplish this, and this is one of those occasions where Microsoft actually provides clear and easy to follow documentation. Login as an administrator on the domain controller. Click Start, Run, and then type ntdsutil. It will prompt you “ntdsutil:”, type “set dsrm password” and hit enter. It will prompt you “Reset DSRM Administrator Password:”. You would really think this is where you would type the new password wouldn’t you? Well, you’d be wrong. Type “reset password on server null“. The “null” part tells the command to operate on the current server (seems like “.”, or “\\.” would be a more consistent convention here). Hit enter and it will finally prompt you to change the password, and once more for confirmation. When you are finished type ‘q‘ to quit DSRM password reset mode, and ‘q‘ again to exit the ntdsutil utility.
Reset DSRM Administrator Password: reset password on server null
Please type password for DS Restore Mode Administrator Account: *********
Please confirm new password: *********
Password has been set successfully.
Reset DSRM Administrator Password: q
Now when I reboot I can login to begin running a disk check in Recovery Console.
The Recovery Console provides system repair and recovery functionality.
Type EXIT to quit the Recovery Console and restart the computer.
Which Windows installation would you like to log onto
(To cancel, press ENTER)? 1
Type the Administrator password: *********
C:\WINDOWS>chkdsk C: /p /r