
Reset Lots Password
-
- Posts: 1
- Joined: 2022/12/20 16:00:48
Reset Lots Password
I inherited a CentOS 7 virtual machine on VMware ESXi. The previous admin team lost the password for root, what is the easiest way to recover or reset the root password, keeping in mind is a VM and I do not have the luxury of sending proper physical keyboard combinations to the VM 

Re: Reset Lots Password
Unless you have a normal user with full sudo access (e.g. part of group 'wheel') then you will need to reboot with access to the machine's console. For assistance with recovering a lost or forgotten root password please see https://wiki.centos.org/TipsAndTricks/ResetRootPassword links to a RH article on how to do this correctly.
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Re: Reset Lots Password
The essential step that the access to console enables is mounting of a filesystem without actually loading the installed OS.
On physical machine one can boot install media in rescue mode to achieve the same.
The "system image" of some VMs can be mounted by the host too. Is VMware one of them?
An alternative to running "passwd" in chroot is to add SSH public key into /root/.ssh/authorized_keys
Then ssh connection as root could be possible and root can run "passwd".
On physical machine one can boot install media in rescue mode to achieve the same.
The "system image" of some VMs can be mounted by the host too. Is VMware one of them?
An alternative to running "passwd" in chroot is to add SSH public key into /root/.ssh/authorized_keys
Then ssh connection as root could be possible and root can run "passwd".