最新消息:20190717 VPS服务器:Vultr新加坡,WordPress主题:大前端D8,统一介绍入口:关于

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

工作和技术 crifan 621浏览 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,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
56 queries in 0.117 seconds, using 18.83MB memory