设为首页收藏本站

ZMX - IT技术交流论坛 - 无限Perfect,追求梦想 - itzmx.com

 找回密码
 注册论坛

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

用百度帐号登录

只需两步,快速登录

搜索
查看: 3118|回复: 1

Linux 或者 centos 启用Boot 单用户模式来重置修改密码,修复启动问题,single教程

[复制链接]
 成长值: 45

签到天数: 4640 天

[LV.Master]伴坛终老

发表于 2014/11/5 19:56 | 显示全部楼层 |阅读模式 | Google Chrome 36.0.1985.125| Windows 7
天涯海角搜一下: 百度 谷歌 360 搜狗 有道 雅虎 必应 即刻
1.jpg
原文介绍


Boot Into Single User Mode (Reset Root Password)

To reset the root password of your server, you will need to boot into single user mode.

Access the Manage section of your server in the customer portal and follow these steps. The option depends on the bootloader version on the machine:

Option 1 (CentOS 6 Linux, etc)

Click [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.
You will see a GRUB boot prompt telling you to press any key - you have only a few seconds to press a key to stop the automated booting process. (If you miss this prompt you will need to restart the VM again)
At the GRUB prompt, type "a" to append to the boot command
Add the text "single" and press enter
System will boot and you will see the root prompt. Type "passwd" to change the root password and then reboot again.
Option 2 (Debian, Ubuntu, CentOS 7, etc)

Click [View Console] to access the console and click the send CTRL+ALT+DEL button on the top right. Alternatively, you can also click [RESTART] to restart the server.
You will see a GRUB boot prompt - press e to edit the first boot option. (If you do not see the GRUB prompt, you may need to press any key to bring it up before the machine boots)
Find the kernel line (starts with "linux /boot/") and add init="/bin/bash" at the end of the line
Press CTRL-X or F10 to boot
System will boot and you will see the root prompt. Type "mount -rw -o remount /" and then "passwd" to change the root password and then reboot again.
FreeBSD

The boot menu has an option to boot into single user mode. Press the key for single user mode (2). At the root prompt, type "passwd" to change the root password and then reboot again.



2.jpg
下面是CENTOS方法

进去如图所示,选择第二项,按下a,然后空格,加入single回车即可。然后进入系统,无需加载一切网络模块mod等,可以直接进入ssh,修改密码,修复开机启动故障,等等操作
3.jpg

欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复

使用道具 举报

精虫上脑 该用户已被删除
发表于 2014/11/5 20:09 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
欢迎光临IT技术交流论坛:http://bbs.itzmx.com/
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册论坛 新浪微博账号登陆用百度帐号登录

本版积分规则

手机版|Archiver|Mail me|网站地图|IT技术交流论坛 ( 闽ICP备13013206号-7 )

GMT+8, 2024/9/17 04:31 , Processed in 0.158404 second(s), 27 queries , MemCache On.

Powered by itzmx! X3.4

© 2011- sakura

快速回复 返回顶部 返回列表