I forgot my Linode's user account password. How do I get back into my Linode?
I'm able to log into Cloud Manager just fine, but I can't log into my Linode.
I tried resetting the root password for my Linode through Cloud Manager, but I still can't log into my Linode:
mylinode login: myuser Password: Login incorrect
How do I get back into my Linode?
This may be a simple misunderstanding about what Linode's root password reset function does for your Linode. Luckily, it shouldn't be hard to resolve, but I'd still like to provide as much information as is reasonable here for future reference.
Logging into your Linode as
When you change the root password for your Linode, you will be changing that Linode's password for the user named
root on that Linode as opposed to the password for any personal user accounts on that Linode.
root is traditionally (but not always) the name of the superuser account with account ID 0, which has full permissions to modify any aspect of the system.
Looking at the provided console snippet, it appears that you are logging in as the
myuser user, which will not have its password changed by Cloud Manager's root password reset feature. To change the password for
myuser, you will need to log into your Linode using the username
root along with the reset root password provided through Cloud Manager. You may need to use the Lish console to perform this task in case your Linode is enforcing the good security practice of disallowing
root-based SSH logins.
Resetting your regular user account's password
After logging in as the root account, you may then change the password for the
myuser user using this command:
You will then be prompted to provide the new password for the
myuser account, then to verify it by providing it again. Assuming this verification completes successfully, you will likely see a message indicating that the password was successfully updated:
passwd: password updated successfully
At the very least, you will not see any messages indicating that the new password failed to set properly.
Cleaning up and best practices for security
Upon updating your password for the
myuser account, it is very important to log out of your root session by issuing the
exit command to return to a login prompt. If you close out of the Lish console window/session before doing this, I strongly urge you to log back in and issue this
exit command to be sure that your Linode's root account has no active sign-ins.
You should now be able to log in as your
myuser user. In case you haven't done so already, you may set up more convenient and secure administration access into your Linode by granting
sudo privileges to a basic user account on your system and creating an public SSH keypair for that user from your home computing device. Along with these aforementioned security enhancements to your SSH server configuration, this will allow you secure yet passwordless access into your Linode through your regular user account using your SSH public key, which can then perform administrative tasks only when necessary by using the
Determine your user account ID (and what it means)
Last but not least, in case you're curious, you may determine your user account ID with the following command:
If this displays
0, you are using the superuser (or
root) account. This will occur either when logging in directly as
root over Lish, or using
sudo as your regular user. If you do not need these administrative powers for whatever you are trying to achieve, I recommend issuing an
exit command to log out of the superuser account. You may optionally expire any cached superuser credentials present on your regular account with this command:
With this information available, forgetting your Linode's user account password should only be a minor inconvenience. The security tips provided herein should also allow you to avert inadvertent access attempts into your Linode, although you can go even further with Fail2Ban.
Along with disabling SSH logins for
root, it is certainly not a bad idea to change your root password again on a fairly frequent basis to ensure the security of your Linode.
This information is quite broadly applicable to multiple Linux distributions, but I suggest you check your distribution's documentation in case you are running a particularly non-standards-compliant distribution for which this advice may need tweaking.
Finally, your Linode's user account password (including its root password) are entirely separate from your Cloud Manager login credentials. You may send a Cloud Manager username reminder or Cloud Manager password reset link to the email address on file with your Linode account through these links available at the bottom of our Cloud Manager login page:
If you are ever unable to access your account even with these utilities, please don't hesitate to reach out to [email protected]. We'll be happy to walk you through the process of getting you back into your account.