最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

how to go into single mode linux to change the root password

工作和技术 crifan 1453浏览 0评论

System : Red Hat Enterprise Linux Server release 5 (Tikanga), Version : 2.6.18-8.el5xen

Problem : today ,we can not login in by root or other users(here we make sure our name and password is correct). but it seems that the system’s username and usepassword system have be corrupted by something yestoday.

Method : go in to single mode Linux ,and change the root the other users’ password .

Detail :

press "e" when system booting ,to go to Grbu edit .

the display like this :

kernel linux-2.4.21-15

module /boot/vmlinuz-2.4.21-15 EL ro root=LABEL=/

select the module line ,then press "e" to edit that line.

add a "single" before the "ro" ,like this :

module /boot/vmlinuz-2.4.21-15 EL single ro root=LABEL=/

then press "Enter" to enable this change .

then press "b" to reboot.

system reboot ,go into a shell like :

sh-2.05#

then you can do :

sh-2.05# passwd root

to change the password of root .

转载请注明:在路上 » how to go into single mode linux to change the root password

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
79 queries in 0.144 seconds, using 22.09MB memory