CentOS 6, Debian, Ubuntu, CentOS 7, FreeBSD, CoreOS, 进入单用户模式(重新设置root密码),单用户模式修改密码
时间:2016-03-21 22:02 来源:linux.it.net.cn 作者:IT
CentOS 6, Debian, Ubuntu, CentOS 7, FreeBSD, CoreOS, 进入单用户模式(重新设置root密码),单用户模式修改密码
CentOS 6, Debian, Ubuntu, CentOS 7, FreeBSD, CoreOS, 进入单用户模式修改密码
To reset the root password of your server, you will need to boot into single user mode.要重置您的服务器的root密码,您将需要引导进入单用户模式。
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:
CentOS 6 进入单用户模式修改密码
1.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.
2.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)
3.At the GRUB prompt, type "a" to append to the boot command.
4.Add the text "single" and press enter.
5.System will boot and you will see the root prompt. Type "passwd" to change the root-password and then reboot again.
Debian, Ubuntu, CentOS 7 进入单用户模式修改密码
1.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.
2.As soon as the boot process starts, press ESC to bring up the GRUB boot prompt. You may need to turn the system off from the control panel and then back on to reach the GRUB boot prompt.
3.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)
4.Find the kernel line (starts with "linux /boot/") and add init="/bin/bash" at the end of the line
5.Press CTRL-X or F10 to boot.
6.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.
CoreOS 进入单用户模式修改密码
CoreOS by default uses SSH key authentication. On Vultr, a root user and password are created. If an SSH key is selected when creating the VPS, this SSH key can be used to login as user "core".
It is possible to reset the standard root login by executing "sudo passwd" as user "core". Login as "core" using the SSH key first.
If you lost your SSH key, then you can login as the "core" user by editing the grub loader. Follow these steps:
1.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.
2.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)
3.At the end of the line that begins with "linux$" add " coreos.autologin=tty1" (no quotes).
4.Press CTRL-X or F10 to boot. You will be logged in as "core" when the system boots.
5.Remember to reboot your server after you have reset your login.
(责任编辑:IT)
CentOS 6, Debian, Ubuntu, CentOS 7, FreeBSD, CoreOS, 进入单用户模式(重新设置root密码),单用户模式修改密码 CentOS 6, Debian, Ubuntu, CentOS 7, FreeBSD, CoreOS, 进入单用户模式修改密码 To reset the root password of your server, you will need to boot into single user mode.要重置您的服务器的root密码,您将需要引导进入单用户模式。 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: CentOS 6 进入单用户模式修改密码 1.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. 2.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) 3.At the GRUB prompt, type "a" to append to the boot command. 4.Add the text "single" and press enter. 5.System will boot and you will see the root prompt. Type "passwd" to change the root-password and then reboot again. Debian, Ubuntu, CentOS 7 进入单用户模式修改密码 1.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. 2.As soon as the boot process starts, press ESC to bring up the GRUB boot prompt. You may need to turn the system off from the control panel and then back on to reach the GRUB boot prompt. 3.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) 4.Find the kernel line (starts with "linux /boot/") and add init="/bin/bash" at the end of the line 5.Press CTRL-X or F10 to boot. 6.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. CoreOS 进入单用户模式修改密码 CoreOS by default uses SSH key authentication. On Vultr, a root user and password are created. If an SSH key is selected when creating the VPS, this SSH key can be used to login as user "core". It is possible to reset the standard root login by executing "sudo passwd" as user "core". Login as "core" using the SSH key first. If you lost your SSH key, then you can login as the "core" user by editing the grub loader. Follow these steps: 1.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. 2.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) 3.At the end of the line that begins with "linux$" add " coreos.autologin=tty1" (no quotes). 4.Press CTRL-X or F10 to boot. You will be logged in as "core" when the system boots. 5.Remember to reboot your server after you have reset your login. (责任编辑:IT) |