Environment


All OnApp versions. Windows virtual servers


Answer


Run the following on a virtual server:

  1. Reboot the virtual server in recovery mode.
  2. Get access to the Windows virtual server disk with the following command:

    kpartx -a -p X /dev/sdb
    CODE
  3. Check if the disk exists:

    fdisk -l /dev/mapper/sdbX1
    CODE
  4. Mount the disk with the following command:

    mount -t ntfs-3g /dev/mapper/sdbX1 /mnt/
    CODE
  5. Run the following commands:

    mv /mnt/Windows/System32/Utilman.exe /mnt/Windows/System32/Utilman.exe.bak
    cp  /mnt/Windows/System32/cmd.exe /mnt/Windows/System32/Utilman.exe
    CODE
  6. Unmount the disk:

    umount  /mnt/
    CODE
  7. Run the following command:

    kpartx -d -p X /dev/sdb
    CODE
  8. Stop and then start the virtual server via the OnApp UI.
  9. Once the virtual server starts, log in to the console and press Windows logo key+U to get a command prompt.
  10. At the command prompt:
  • Reset the password of an existing user, type the text below (we are changing the administrator’s password to onapppass):

    net user Administrator onapppass /active:ye
    CODE


    OR

  • To create a new user with the username NewUser and password abc123 into the Administrator group:

    net user NewUser abc123 /add
    net localgroup Administrators NewGuy /add
    CODE

   11. Restore the original utilman.exe from the virtual server:

C:
cd windows\system32
del utilman.exe
ren Utilman.exe.bak Utilman.exe
CODE