Forgotten password workaround Win7/Win2k8

Have you ever had a VM sit in your repository so long that you forgot the Administrator password?  Neither have I and that’s why I didn’t have to look up these steps…(borrowed from a Microsoft forum).

Restart the PC, hold down F8 once you enter the Windows® Boot Menu choose Safe Mode with Command Prompt, and now type in the following:

net user root /add
net localgroup Administrators root /add
net localgroup Users root /delete

The first command adds a new user called “root”, the second command adds that user to the Administrators group and the third command removes the user from the Users group which leaves him in the Administrators group.

Once you have logged in as your “root” user you can then change the Administrator password, or keep logging in as “root” which seems more natural for some of us.

Finding large files/folders on ESX(i) or Linux

While patching ESX 4.0 systems we ran out of space while remediating patches.  Upon investigation we found the root volume completely full.  Running the following command basically stalled out:

du -h / | grep ^[0-9.]*G

Why?  Well it didn’t “stall”, I am impatient.  The second that du hits the /vmfs volume with over 60 datastores, there’s a lot to think about.  Using an exclude may be obvious to those who admin *nix systems every day.

du -h / --exclude=vmfs | grep ^[0-9.]*G

Why did we run out of space?  Thanks to running the “Export System Logs” for VMware Support Team all willy-nilly over the 2 years these systems have been in production leaves residual files.  Namely over 2.5GB of vmsupport*.tgz files in the following folder:

/usr/lib/vmware/hostd/docroot/downloads