How to reset a root password on VPS and a Dedicated server with CentOS 7
Security Centos VPS Payment DedicatedVirtual server Dedicated server Administration Soft
- Reset a root password on VPS
- Reset a root password on a Dedicated server
Reset a root password on VPS
If a server is enabled and downloaded, you should reboot it using the button Send Ctrl+Alt+Del.
After BIOS reboot, you will see the developer menu GRUB.
To change the lines of the download menu, you should use the button ↓ and ↑. Highlight the necessary line and press the button е. This will start the editing of download settings.
Then, you should find and edit the line of initial download, which starts from linux /boot/…
The ro (read-only) feature downloads Linux core in the reading mode. To save the changes after you reset the root password, you should change ro to rw (read-write) in the reading-recording mode.
Let’s state the launch of the bash command by entering rw init=/sysroot/bin/sh as we see in the screenshot.
Then, you should press Ctrl+X or F10 and wait for the download of the operating system in a single-user mode.
To install a new root password, enter the command:
Then the command:
Then, enter a new root password:
Let’s save the changes using the commands:
Reset a root password on a Dedicated server
In the IPMI web interface, access the section Remote Control → Console Redirection and press Launch Console.
Remember that to work in the console, you should have Java Runtime Environment software installed. The installation file will be downloaded automatically after you press Launch Console.
Save and launch the file. Then, tick the dialog box at the bottom and press Run.
If you launch it for the first time, you may see the message from the Java security system:
If you see the screen, you should enter the IP address IPMI (using both http:// and https:// protocols) in security exceptions in the Java settings. You can see the guide for this on the Java website. Then, you can start the console.
After you log in to the console, you should reset the server. To do this, go to the section Remote Control → Power Control and choose Reset server.
After you reset the server, before you launce your OS, you will see the GRUB menu in the BIOS menu.
Use the buttons ↓ and ↑ for menu navigation. Then, choose your download line and press e for editing.
Find a line starting from linux in the 64-bit version of IBM Power Series and linux16 in systems based on BIOS x86-64 or linuxefi in UEFI systems.
Change the parameters from ro to rw, delete the parameters rhgb and quiet:
Then, add rd.break enforcing=0 at the end:
Press CTRL + X to launch the system in the single-user mode.
Start the commands to change the root password and reset the system:
If you have any difficulties in the setting or you have extra questions, contact our customer support using the ticket system.