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
方法一:
官方建议:在KB中提到ESXi 3.5, ESXi 4.x, ESXi 5.x and ESXi 6.xReinstalling 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主机后可以使用空密码登录然后重新设置新密码。
- [越狱教程]ios9.1验证关闭 不影响越狱
- [手游攻略]完美世界3D招募系统怎么玩 招募系统玩法攻略
- [手游攻略]捉妖记手游挖宝系统怎么玩 挖宝系统玩法攻略
- [越狱教程]ios9.2最新版越狱教程 ios9.2越狱工具下载
- [手游攻略]完美世界3D攻略 完美世界3D高手进阶攻略大全
- [手游攻略]完美世界3D活动系统怎么玩 活动系统玩法攻略
- [手游攻略]完美世界3D英雄系统怎么玩 英雄系统玩法攻略
- [手游攻略]荣耀对决plus手游摆摊系统怎么玩 摆摊系统玩法攻略
- [手游攻略]荣耀对决plus手游攻略 荣耀对决plus手游高手进阶攻略大全
- [手游攻略]荣耀对决plus手游英雄怎么洗炼 英雄洗炼攻略
- [越狱教程]ios9怎么越狱 ios9完美越狱图文教程