Union flag call 0330 660 0255status support
log in
  • Heart Internet mobile logo
  • Heart Internet Logo
  • Reseller Hosting
  • Premium Hosting
  • Web Hosting
  • VPS
  • Dedicated Servers
  • More

For account and billing queries call our helpline
0330 660 0255

For technical issues relating to your hosting please use our Support database



For information on the status of the Heart servers please use our status page

Heart Internet Support Database
  • Get support
  • Suggest a question
All Categories
Expand
Category
Accounts and Billing (54)
Expand
Category
Add-Ons (84)
Expand
Category
cPanel Web Hosting (26)
Expand
Category
Domain Names (203)
Expand
Category
Email Hosting (153)
Expand
Category
Managed WordPress (147)
Expand
Category
Reseller Hosting (162)
Collapse
Category
Servers (514)
Expand
Category
1st & 2nd Generation Dedicated Servers (147)
Collapse
Category
Hybrid Servers (158)
empty
Category
cPanel (9)
empty
Category
Linux (21)
empty
Category
Other (22)
empty
Category
Plesk (14)
empty
Category
WHM (6)
empty
Category
Windows (17)
empty
Category
Latest Generation Dedicated Servers (36)
empty
Category
SSH (12)
Expand
Category
VPS (161)
Expand
Category
Web Hosting (650)
Home » Categories » Multiple Categories

How do I reset my root user password on my virtual Linux server?

Article Number: 471 | Rating: 3/5 from 8 votes | Last Updated: Thu, Apr 23, 2015 at 12:03 PM

One of the advantages of a VPS or hybrid server is that they are virtualised, providing additional access to manage the server even if you are locked out of the root account.

You can use the out-of-band SSH console to get back into your server if you have forgotten the root password.

Getting an SSH Client

You will need an SSH client to access the out-of-band console.

If your computer is running OS X or Linux, you have the Terminal application already installed on your computer.

If your computer is running Windows, you will need to download a third-party SSH client, such as PuTTY.

Prepare Your Server

You will first need to turn your server off.

To do this:

  1. Log into your Customer Area
  2. Click ‘Manage VPS and Hybrid Servers’
  3. Click the icon next to the server you want to change the password for
  4. Click ‘Turn Off Server’

Screenshot of the Heart Internet Server Control Panel

Log into Your Console

When you have turned off your server, you can now log in via the SSH console.

To get the login details:

  1. Click on the ‘Console’ tab in your server’s Control Panel
  2. Take the details from the ‘Text-based (SSH) console’ section
  3. Connect to your SSH console by entering username@ssh-host
  4. Add in the password (revealed in the Control Panel)

 Boot the Server

Once you have logged into the console, you should see the following screen:

Screenshot of an SSH window showing you that your server is powered off

To boot the server:

  1. Enter ‘P’
  2. Wait for the server to boot

Screenshot showing the operating system choices on your server

This screen shows the operating system choices.  The top one is the default – the one that would normally start – but you want to start the server in single-user mode.

Single-user mode does not prompt you for a root login and allows you to change the password without prompting you for it.

To edit the boot parameters, allowing you to start the server in single-user mode:

  1. Press E
  2. Use the arrow keys to highlight the Kernel Boot Parameters

Screenshot showing the kernel boot parameters for your operating system

  1. Press E again

Screenshot of the BASH-Like line editing

  1. Press space, then 1

Screenshot of the BASH-like Line editing

  1. Press Enter
  2. Press B to boot the server
  3. The server will start booting in single-user mode

 Resetting the Password

Once the server has booted up, you will see this:

Screenshot of your server in single-user mode

Dependent on the Linux distribution, your file system may be read-only when loaded in single-user mode.

To check:

  1. Enter

mount

  1. Make certain that the / file system has (rw) or (ro) after it
  2. If the file system is read-only, it will say (ro), and you will need to switch it to writable

To switch the file system to writable:

  1. Enter

mount -o remount,rw /

To reset the root password:

  1. Enter

passwd

  1. Enter in your new password and press enter

Screenshot of where to enter your new password

  1. Enter in the password again and press enter
  2. Your new password will be saved

Reboot the Server

Once the password has been changed, you can reboot the server.

To reboot the server:

  1. Enter

reboot

  1. The server will reboot in normal mode
Posted - Mon, Mar 16, 2015 at 5:14 PM.
Filed Under: Hybrid Servers, Linux, Linux, SSH, VPS
3 (8)
Article Rating (8 Votes)
Rate this article
  • Icon PrinterPrint Article
  • Icon EmailEmail Article to Friend
  • Icon PDFExport to PDF
Related Articles
How do I get support from the Heart Internet Customer Services team?
Added on Tue, Mar 3, 2015
How do I order an SSL Certificate?
Added on Tue, Dec 15, 2020
How do I connect to my virtual Linux server through SSH?
Added on Wed, Mar 25, 2015
How can I get my website or database back after I’ve accidentally deleted it?
Added on Mon, Mar 2, 2015
How do I secure my DNS resolver against amplification attacks?
Added on Tue, Mar 3, 2015
 
Heart Internet Logo
Services
  • Domain Names
  • Web Hosting
  • Premium Hosting
  • Reseller Hosting
  • More
  • Virtual Private Servers
  • Dedicated Servers
  • Sign Up
Company
  • About Heart Internet
  • Our Blog
  • Support
  • Our Awards
  • More
  • Careers
  • Contact Us
  • Testimonials and Reviews
Community
  • Affiliate Program
  • Events We Sponsor
© 2016 Heart Internet Ltd. All rights reserved.
Terms and conditions Privacy Policy Sitemap
Heart Internet Logo