虚拟服务器忘记密码,虚拟化服务器Xenserver 7忘记root密码重置方法

In a previous article I detailed how one could reset a lost root password to XenServer 6.2.  While the article is not limited to 6.2 (it works just as well for 6.5, 6.1, and 6.0.2), this articleis dedicated to XenServer 7.0 as grub2 has been brought in to replace extlinux.

As such, if the local root user's (LRU) password for a XenServer 7.0 is forgotten physical (or "lights out") access to the host and a reboot will be required.  The contrast comes with grub2, the methods to boot the XenServer 7.0 host into single user mode, and how to reset the root password to a known token.

THE GRUB BOOT SCREEN

Once obtaining physical or "lights out" to the XenServer 7.0 host in question, on reboot the following screen will appear:

RmR4F38cq96zl5YEFgkYcInm6lrH7nsT6L1YBFHiJ4kcbf7H3EWG+u93eqwBcPEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAw6X8AlZE2ebA8R6gAAAAASUVORK5CYII=

It is important to note that once this screen appears, you only have four seconds to take action before the host proceeds to boot the kernel.

As should be default, the XenServer kernel is highlighted.  One will want to immediately press the ekey (for edit).

This will then refresh the grub interface - stopping any count-down-to-boot timers - which will reveal the boot entry.  It is within this window (using up, down, left, and right) one will want to navigate to around line 4 or five and isolate "ro nolvm":

scTgSxwJ71oAAAAASUVORK5CYII=

Next, one will want to remove (or backspace/delete) the "ro" characters and type in "rw init=/sysroot/bin/sh", or as illustrated:

aythAxzvVneza6GthrKywnR1q1Q3mgwUthWz5QBAI9j9kHmIgCAtXCrALwA2gsA+D7pj0kA4FnQXgDALeA3IwBvgvYCAAAAFkN7AQAAAIuhvQAAAIDF0F4AAADAYmgvAAAAYDG0FwAAALAY2gsAAABYDO0FAAAALIb2AgAAABZDewEAAACLob0AAACAxdBeAAAAwGJoLwAAAGAxtBcAAACwGNoLAAAAWAztBQAAACyG9gIAAAAWQ3sBAAAAi6G9AAAAgMXQXgAAAMBiaC8AAABgMbQXAAAAsBjaCwAAAFgM7QUAAAAshvYCAAAAFkN7AQAAAIuhvQAAAIDF0F4AAADAYpz24P8BoL7zZ2UuK2wAAAAASUVORK5CYII=

Don't worry if the directive is not on one line!

With this change made, press both Controland Xat the same time as this will boot the XenServer kernel into single user style mode, or better known as Emergency Mode:

AAAeDH+FS0AAMowhgEAKHPbGO7+lS5+lA0A+GqMYQAAyvBDaQAAyjCGAQAowxgGAKDK3x9AnnfyBbTJAAAAAElFTkSuQmCC

HOW TO CHANGE ROOT'S PASSWORD

From the Emergency Mode prompt, execute the following command:

chroot /sysroot

Now, once can execute the "passwd" command to change root's credentials:

gNcSLGz+07VuwAAAABJRU5ErkJggg==

FINALLY....

Now that root's credentials have been changed, utilize Control+Alt+Delete to reboot the XenServer 7.0 host and one will find via SSH, XenCenter, or directly that the root password has been changed: the host is ready to be managed again.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值