VMware Cloud Community
Cruicer
Enthusiast
Enthusiast

Looking for a script to change root password

Instead of attempting to re-invent the wheel, I have about 30+ ESX hosts, and my Compliance department is requesting I change the root passwords every 90 days, does anyone have a script that I can you to do this with?...as you can image logging into each one is becoming quite a pain.

Thanks in advance.

0 Kudos
3 Replies
Texiwill
Leadership
Leadership

Hello,

Many Linux Admins use a centralized password database (NIS, LDAP, or something else) to do this. However, if they can not then they use a script that they create themselves to manage this. Such a script is intrinsically tricky to setup.

Key issues:

1) Use sudo requires the use of expect to program

2) Single password entry (no stored files etc.)

I have been working on a tool to do just this, that uses sudo and it is pretty non-trivial. There are several ways to change passwords within ESX, but you then have to change the password used by VC, and the Update Manager. The last two will require you to type them into VirtualCenter.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education. As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos
admin
Immortal
Immortal

Why would you have to change the password on VC and Update Manager just because you changed the root password? Doesn't VC use the vpxuser account to manage the ESX server...and not the root account?

Chris

0 Kudos
Texiwill
Leadership
Leadership

Hello,

Correct the vpxuser is used, however, if VC and the ESX server get out of sync and the ESX server shows disconnected I have had to retype the new password to get it to rejoin. Which forced me to do it for UM as well.

This depends on how stable your VC install is.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education. As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XIV: 2009-2023,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos