Updating a Lost Root Password In A Dedicated Server
If you have lost your root password for security it’s not possible to reset it from your control panel. First2Host has no access to your server if you lose your password. If you don’t have an active LTSP we won’t be able to reset the password for you and you will need to complete this yourself.
To start you need to request that we perform a netboot on your server, Submit a ticket to the product support team explaining you need your root password updating. After a few minutes, we will boot your server using a network image and send you access details. Log in to the server with the new login details we send you. Next, you need to mount the drive with your root account on. We mark all drives carrying the root account with a (*) Some German servers don’t have this function but the os is usually deployed to /dev/sda3
Type
fdisk –l
you should see something like this
===========================================================
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20478976 83 Linux
/dev/sda2 2550 60736 467378176 83 Linux
/dev/sda3 60736 60801 523264 82 Linux swap / Solaris
===========================================================
On this system, the root account is on /dev/sda1 as defined by the *
Now you need to mount that drive so we can work on it. Type;
mount /dev/sda1 /mnt
(changing sda1 for the drive with root on, on your system)
Next, let’s Chroot so we can use it
chroot /mnt
NOTE: If your server is in Germany the correct command to use is
chroot-prepare /mnt
Now you can update the password by issuing the following command
Passwd
Once you have updated your password you will need to reboot your server to exit rescue mode, make sure you set the netboot to hard drive and not rescue mode. Once you have changed the boot order to hard drive make sure you reboot the server.
How was this article? – Updating a Lost Root Password
You might also like
More from Dedicated Servers
Enable Mod_RemoteIP – See Visitors Real IP address when using Cloudflare & Apache
If you are using Cloudflare on your Apache server you will always see Cloudflare IPs in your logs and not …
Fix 413 Request Entity Too Large Errors When Using NGINX
Just like Apache, NGINX imposes default limits on the size of files that can be uploaded. A 413 Request Entity …
Cloud-init Modules That Automate and Customize Deployments
Cloud-init is a popular way to automate deployments of instances in a cloud or none cloud environment. To save having …
1 Comment
[…] Updating a Lost Root Password […]