Guide to Resetting Password on Ubuntu via GRUB

VPTS Team Content has been moderated
Published date:8/8/2025 Update:8/8/2025 Views:156 Reviews: 4.7/5180reviews
VPTS on

Password reset instructions are an essential solution when you cannot log into your VPS due to a forgotten or lost password. Properly resetting the password not only helps restore access...

Password reset instructions are an essential solution when you cannot log into your VPS due to a forgotten or lost password. Properly resetting the password not only restores access but also ensures the security of data and systems. In this article, the companyVPTSwill provide detailed execution steps along with important notes so you can perform operations quickly, accurately, and maintain stable VPS performance.

Brief introduction to GRUB

GRUB(GNU GRand Unified Bootloader) is the default boot manager on most Linux distributions, including Ubuntu. Besides selecting an operating system to boot, GRUB also allows users to edit boot parameters, thereby granting direct access to command-line mode with root privileges to reset passwords.

Applicable cases

You can apply this guide when:

  • Forgot root password and unable to log in to the system
  • Root account locked due to too many incorrect password attempts
  • Need urgent access recovery to handle emergencies

Step 1: Boot into GRUB menu

  • Restart server/VPS.
  • Open VNC on the VPS management page; when the boot screen displays the logo or GRUB information,press and hold keyShift(orEscon some machines) to show the GRUB menu.
reset password
  • Then press the e key

Step 2: Modify boot mode

  • At the rowro net.ifnames=0....find and change to:

rw init=/bin/bash
reset guide

Step 3: Reset root password

  • ClickCtrl + XorF10to boot into bash mode.
  • Once booted, enter the command  mount  |  grep -w  /  to verify read and write permissions
  • Then you can reset the root password by typing passwd, set a new password and restart with the commandexec /sbin/init (as shown below)
reset guide
  • After pressing Enter, you need to restart the VPS and log in using the newly set password if your installation was successful

Security notes after resetting root password

  • Set a strong password: at least 8 characters, including uppercase, lowercase, numbers, and special characters
  • Use authenticationSSH Keyinstead of a password to increase security
  • Regularly back up configuration data and important files

Wishing you success in your setup and consistently stable system operations! – VPTS!!!

CONCLUSION

Above is the detailed guide fromVPTS helps you reset the root password on Ubuntu OS via GRUB. With a few simple steps, you can quickly restore administrative privileges and continue operating the system without interruption. If you encounter any difficulties during the process, VPTS's technical team is always ready to support you 24/7 to ensure your service runs stably and securely.

VPTS – Comprehensive Digital Infrastructure Solutions Provider

VPTS is a digital infrastructure solution provider in Vietnam, serving deployment, operation, and data storage needs for individuals, developers, and enterprises. The service ecosystem includesVietnam VPS, International VPS, VPS Anti DDoS, Hosting cPanel, dedicated server, Rack rental, Proxy IPv4/IPv6, S3 MinIOandCloud Storage.

Besides providing infrastructure resources, VPTS also focuses on assisting customers with deployment, configuration, and practical troubleshooting. Content on the VPTS Blog is drawn from common scenarios in operating VPS, servers, and online systems, helping readers understand root causes and apply clear solutions.

VPTS – Stable infrastructure, flexible solutions, and continuous partnership throughout operations.

VPTS Team Contact Information