Windows Password Reset on OCI

Jun 12, 2025

Overview

This lecture explains step-by-step how to reset a forgotten Windows instance password on Oracle Cloud Infrastructure without terminating the instance.

Prerequisites & Initial Steps

  • Perform a full backup of the Windows instance boot volume before making changes.
  • Ensure a Ubuntu instance exists in the same compartment and subnet as the Windows instance.

Boot Volume Detachment & Attachment

  • Stop the Windows instance from the Compute section in the OCI console.
  • Detach the boot volume from the stopped Windows instance.
  • Attach the Windows boot volume to the Ubuntu instance using iSCSI with read/write access.

Accessing & Modifying the Windows Volume on Ubuntu

  • Log in to the Ubuntu instance using SSH.
  • Use the provided iSCSI connect command to attach the volume.
  • Identify and verify the attached Windows volume partition (usually /dev/sdb1, /dev/sdb2, or /dev/sdb4).
  • Check the NTFS volume for errors using sudo ntfsfix /dev/sdb4 (replace as appropriate).
  • Create a mount directory and mount the Windows partition to it.

Password Reset Process

  • Update Ubuntu OS and install chntpw using apt.
  • Use chntpw to clear the OPC user password and unlock the account.
  • Save changes and exit chntpw.
  • Edit the registry to allow blank passwords using chntpw -e.

Cleanup & Re-Attachment

  • Unmount the Windows file system from Ubuntu.
  • Disconnect iSCSI and detach the boot volume from Ubuntu.
  • Attach the boot volume back to the original Windows instance.
  • Start the Windows instance from the OCI console.

Setting a New Password & Final Registry Fixes

  • Log into Windows using RDP without a password.
  • Use Control Panel to create and set a new password for the OPC user.
  • Open Registry Editor and set the LimitBlankPasswordUse key to 1.
  • Log out and reconnect via RDP to verify successful login with the new password.

Key Terms & Definitions

  • Boot Volume — The primary disk containing OS files required to boot a cloud instance.
  • iSCSI — A protocol that allows clients to send SCSI commands to storage devices over IP networks.
  • ntfsfix — A utility to fix some common NTFS file system errors in Linux.
  • chntpw — A Linux tool to modify Windows NT/2000/XP/Vista/7/8/10 user passwords.
  • Registry Editor — A Windows tool for editing system registry keys and values.

Action Items / Next Steps

  • Review the backup policy for all instances.
  • Verify that the new password works by logging in again.
  • Follow all linked documentation as referenced in the video description.