joejburgin
Contributor
Contributor

Help, I changed the ESXi root password via powerCli, now I cannot login with the console or web client.

Jump to solution

Help, I changed the ESXi root password via powerCli, now I cannot login with the console or web client, but I can still login through powerCli. The command I used was;

Connect-VIServer esxihostname -User root -Password newpasswd

This a production network btw, I connected to each host and ran the command above, these ESXi hosts are not on a domain either,

is there something that I may have left out. I truly appreciate any assistance you folks can provide.

Thanks, Joe

0 Kudos
1 Solution

Accepted Solutions
srwsol
Hot Shot
Hot Shot

This is probably a longshot, but a lot of stuff in windows land isn't sensitive to capitalization like Unix is.  I'm just wondering if your new password you put in through powerCLI had mixed case letters in it, and if either the capitalization was dropped by the windows powerCLI command parser, or it got interpreted as all caps or something.   If you can still get in through the powerCLI you might try resetting the password again to something easy without mixed case capitalization, and if your password policy on ESXi requires a special character, try something different than a "$", such as a "_"  (I find that a "_" is less likely than some other special characters, like a "-" or a "/" to cause problems with parsers.).

Edit:

Another thing you might try before messing with the root password again, is to create another ESXi userid using powerCLI and see if the password ends up what you think it should, and if you can get in with the vsphere client using it.  That way you may discover if there are some issues with certain characters or capitalizations through the powerCLI command parser without risking losing your remaining root access through powerCLI.  After some experimentation you may figure out what went wrong with your initial password change and may be able to fix it with less risk of losing access.  I'm also assuming that you can't create a new userid on ESXi that's capable of changing the root password no matter what authority you give it, otherwise you could create a new userid with PowerCLI, then login to the vsphere client with it and change the root password from there.

View solution in original post

0 Kudos
9 Replies
weinstein5
Immortal
Immortal

Welcome to the Community - I am sorry to say there is no supported method of resetting the root password other than reinstalling ESXi - If you do google how to reset an ESXi root password your will find options but the are NOT supported -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
grasshopper
Virtuoso
Virtuoso

Did you run any other commands?  The line you listed (Connect-VIServer) simply connects to the VMHost (and/or vCenter), it doesn't make any changes.

a_p_
Leadership
Leadership

So you are still  able to login through PowerCLI? Does the password contain any special characters or - depending on the defined keyboard language - any keys which are different from the US keyboard layout (e.g. "Z" <-> "Y")?

André

0 Kudos
joejburgin
Contributor
Contributor

Sorry, I left this out, (bad day today),

Connect-VIServer esxihostname -User root -Password oldpasswd

Set-VMHostAccount -UserAccount root -Password newpasswd

Disconnect-VIServer esxihostname

Thanks Again for the Help,

Joe

0 Kudos
joejburgin
Contributor
Contributor

Sorry folks I mistakenly left out all the commands I ran, hope this makes more sense

,

Connect-VIServer esxihostname -User root -Password oldpasswd

Set-VMHostAccount -UserAccount root -Password newpasswd

Disconnect-VIServer esxihostname

The commands completed successfully,and I can still connect via powercli with the new password, but when I try to connect via console or web client, I get a wrong password type error for root.

Again sorry for the missing info, it was hectic at the time I posted earlier, and also I really appreciate all help,

Joe

0 Kudos
joejburgin
Contributor
Contributor

Hey André,

The commands completed successfully,and I can still connect to the host via powercli with the new password, but when I try to connect via console or web client, I get a wrong password type error for root. The only special character that was used was the dollar sign ($),

Thanks Again, Joe

0 Kudos
srwsol
Hot Shot
Hot Shot

This is probably a longshot, but a lot of stuff in windows land isn't sensitive to capitalization like Unix is.  I'm just wondering if your new password you put in through powerCLI had mixed case letters in it, and if either the capitalization was dropped by the windows powerCLI command parser, or it got interpreted as all caps or something.   If you can still get in through the powerCLI you might try resetting the password again to something easy without mixed case capitalization, and if your password policy on ESXi requires a special character, try something different than a "$", such as a "_"  (I find that a "_" is less likely than some other special characters, like a "-" or a "/" to cause problems with parsers.).

Edit:

Another thing you might try before messing with the root password again, is to create another ESXi userid using powerCLI and see if the password ends up what you think it should, and if you can get in with the vsphere client using it.  That way you may discover if there are some issues with certain characters or capitalizations through the powerCLI command parser without risking losing your remaining root access through powerCLI.  After some experimentation you may figure out what went wrong with your initial password change and may be able to fix it with less risk of losing access.  I'm also assuming that you can't create a new userid on ESXi that's capable of changing the root password no matter what authority you give it, otherwise you could create a new userid with PowerCLI, then login to the vsphere client with it and change the root password from there.

0 Kudos
joejburgin
Contributor
Contributor

Hey srwsol,

That was the charm, I changed the root password to contain no special characters,through powerCli, and I was able to successfully login again with the console and ssh.

Thanks Again to Everyone for responding, I truly appreciate it,

Joe

0 Kudos
joejburgin
Contributor
Contributor

Just a quick update, to use the special characters in powerCli, you must encase your password in single quotes, ex: 'pa$$word'

Thanks to everyone again,

Joe

0 Kudos