2012年2月5日 星期日

Reset root password for Ubuntu 10.04 LTS

Oops, I am trying to reset root password for a server with Ubuntu 10.04 LTS but the grub menu just doesn't come up. So it turns out the interactive grub menu is  disabled since GRUB2. And what we need to do to get into the GRUB menu is to hold the shift key during boot. According official documentation, pressing the ESC key may also display the menu sometime too (Reference here)

So once you get into the menu, move your text cursor to the end of the line starting with "LINUX", append "init=/bin/bash panic=3" and press with CTRL+X to start booting to single user mode.

Once you are booted to single user mode, you will be shown wilt login prompt 

root@(none)~# 

You could now type "mount -o remount,rw /" to remount / directory to change the root mount from read-only to read-writable. Now you could issue "password" command to update the password on this server.

沒有留言:

張貼留言