本文介绍了无法更改数字海洋小滴的root密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以root用户身份登录,然后要求输入更改密码,我输入了当前密码和新密码,但不起作用.从consol登录后,输入了重置Droplet密码后通过电子邮件收到的用户名和密码.询问-更改root的密码.(当前)UNIX密码:输入新的UNIX密码:重新输入新的UNIX密码

与xxx.xx.xx的连接已关闭.

解决方案

重置根密码

如果通常使用密码登录到Droplet,或者已为系统上的 root sudo 用户设置了密码,您需要登录的凭据.

如果您使用SSH密钥登录服务器,但尚未为 root 帐户或 sudo 用户设置密码,则需要使用DigitalOcean控制面板为您创建密码.

导航到


注意:某些操作系统使用内部管理的密码,这意味着您无法从控制面板重设root密码.在这种情况下,您会在重置根密码"部分中看到以下消息:

此Droplet的根密码在内部进行管理,无法从控制面板进行更改.请通过SSH进入Droplet进行管理.

请参见

在登录提示下,输入您要用作登录的用户.通常是root用户或配置了sudo特权的用户.


注意:

如果直接在控制台中键入内容,它最初可能会错误地读取您的数字键,就像按下 SHIFT 键一样.例如,按2键可以输入@.

这仅在键入时发生.您可以通过复制文本,然后按 CTRL + v 将其粘贴到控制台中来避免此问题.您还可以重置此行为,并通过几次按 SHIFT CTRL ,然后再次测试数字键来确保正确接收了击键.


出现提示时,输入与该帐户关联的密码.为了安全起见,在您键入或粘贴时,密码不会显示字符,光标也不会更改.

输入密码后,请按ENTER.如果这是您在通过控制面板重置根密码后第一次登录,系统将提示您再次输入密码,然后要求您选择新密码:

 您需要立即更改密码(root用户强制执行)更改root密码.(当前)UNIX密码:输入新的UNIX密码:重新输入新的UNIX密码: 

成功输入凭据后,如果需要,请设置新密码,然后应登录Droplet.在这里,您可以重置行为异常的配置文件或服务,以恢复网络访问.

Login from root user and after that it's asking for change password I enter a current and new password but not working. login from consol entered a user name and password received on email after reset droplet password. It's asking - Changing the password for root.(current) UNIX password:Enter new UNIX password:Retype new UNIX password

Connection to xxx.xx.xx closed.

解决方案

Reset the Root Password

If you typically log in to your Droplet using a password, or if you have set a password for the root or a sudo user on the system, you already have the credentials you need to log in.

If you log in to your server using SSH keys and have not set up a password for the root account or a sudo user, you will need to use the DigitalOcean Control Panel to create a password for you.

Navigate to the control panel. From the project the Droplet is in, or from the main navigation’s Droplets page, locate the Droplet. Click the Droplet’s name to open its detail page, then select Access in the left navigation.


Note: Some operating systems use internally-managed passwords, which means you cannot reset the root password from the control panel. In these cases, you’ll see the following message in the Reset root password section:

This Droplet’s root password is managed internally and cannot be changed from the control panel. Please SSH into the Droplet to manage it.

See How to Recover from Lost SSH Keys for additional steps you’ll need to take.


Click Reset Root Password to send an email to the address associated with your DigitalOcean account. You can use the password provided to log in to your Droplet through the console.

Log In with the Console

From the DigitalOcean Control Panel, first click the name of the Droplet you want to access, then select Access from the left navigation. Click the Launch Console button to open a web-based console session.

When the console opens, click the console screen and press ENTER to ensure that the login prompt has focus:

At the login prompt, enter the user you want to log in as. This will typically be the root user or a user configured with sudo privileges.


Note:

If you type directly into the console, it may initially read your number keys incorrectly, as if the SHIFT key is pressed. For example, pressing the 2 key may enter @.

This happens only when typing. You can avoid the problem by copying the text, then pasting it into the console by pressing CTRL + v. You can also reset this behavior and ensure that your key strokes are being received correctly by pressing SHIFT and CTRL a few times, then testing your number keys again.


When prompted, enter the password associated with the account. For security purposes, as you type or when you paste, the password the characters will not be displayed and the cursor will not change.

Once you’ve entered the password, press ENTER. If this is the first time you’ve logged in after resetting the root password through the control panel, you will be prompted to enter the password again, then asked to choose a new password:

You are required to change your password immediately (root enforced)
Changing password for root.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:

Once you’ve successfully entered your credentials and, if required, set a new password, you should be logged in to your Droplet. From here, you can reset misbehaving configuration files or services in order to restore network access.

这篇关于无法更改数字海洋小滴的root密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 08:32
查看更多