您的位置:首页 > 文章资讯 > 网络技术
VMware vSphere ESXI忘记密码怎么重置?
作者:xzwdu下载站小编 | 发表时间:2022-01-17 | 来源:本站整理 | 阅读次数:
官方建议:在KB中提到ESXi 3.5, ESXi 4.x, ESXi 5.x and ESXi 6.x
Reinstalling the ESXi host is the only supported way to reset a password on ESXi. Any other method may lead to a host failure or an unsupported configuration due to the complex nature of the ESXi archi

名称:知心慧学教师端

类型:学习教育

版本:v1.3.5

更新:2023-05-22

平台:AndroidIpnone

简要介绍

知心慧学教师端app是由xzwdu下载站收集于官网最新发布版本,知心慧学教师端app是专为教师提供的移动工作平台;教师可以通过这个软件直接的选择查看学生的详细学情;可以批阅学生的作业,随时随地轻松的打开就能进行批改,有效的节约时间,<详情>

方法一:

官方建议:在KB中提到ESXi 3.5, ESXi 4.x, ESXi 5.x and ESXi 6.x
Reinstalling the ESXi host is the only supported way to reset a password on ESXi. Any other method may lead to a host failure or an unsupported configuration due to the complex nature of the ESXi architecture. ESXi does not have a service console and as such traditional Linux methods of resetting a password, such as single-user mode从3.5/4.x/5.x/6.x开始,只支持重新安装来重置密码.

方法二:

准备工作:使用Linux镜像(centos,Redhat等)制作一个启动盘。
实验环境:此次的实验环境没有硬件主机,是基于VMware workstation的虚拟机实现,esxi主机的版本为6.7版本,使用的Linux镜像CentOS 1908版本。

==============================

1、
开机之后进入启动盘,按照下图所示的步骤进入centos的救援模式



======>



======>



======>



==============================
2、
然后按照一下步骤进行密码修改
mkdir /mnt/disk
mount /dev/sda5 /mnt/disk
cd /mnt/disk
ls


==============================
3、
cp /mnt/disk/state.tgz /tmp
cd /tmp
tar xf state.tgz
tar xf local.tgz


==============================

4、
vi etc/shadow
删除加密后的密文密码




==============================

5、
rm /tmp/state.tgz /tmp/local.tgz
tar czf /local.tgz etc/
tar czg state.tgz local.tgz


最后reboot重启

==============================
重启后就可以使用空密码登录



===================================================================

另外一种情况就是进入etc/shadow这个文件之后发现root用户后面没有密码加密后的密文,是空的,这个时候我们在"root:"后面随便写一些字符然后保存退出重启一遍,然后按照前面通过启动盘进入救援模式的步骤再来一遍 将之前随便写的一些字符删除,然后保存退出重启,这个时候步骤正确没问题的话,进入esxi主机后可以使用空密码登录然后重新设置新密码。