1

I changed my main account password on Ubuntu server 15.06 a few days ago and promptly forgot it.

I have tried dropping into the root shell via Grub, but it actually prompts me for the root password again "Please enter root password to enter maintenance mode, or hit Ctrl-D to continue". Hitting ctrl-D just brings me to the login prompt.

I have physical access to the box, and this UI response seems inconsistent with what's posted here: https://wiki.ubuntu.com/RecoveryMode

Is there a way to reset the "root" user password in Ubuntu 15.06?

  • The UI response is consistent with you having set a password for `root` i.e. having enabled the root account - something that goes against the Ubuntu access model: see [RootSudo](https://help.ubuntu.com/community/RootSudo) – steeldriver Nov 29 '15 at 22:27
  • http://askubuntu.com/a/435347/167115 – mchid Nov 30 '15 at 03:31

1 Answers1

2

Try this:

Boot your machine with Ubuntu Live-CD/USB and select Trying Ubuntu without installation option when it is prompted.

When you get complete desktop ready.

Open a terminal,

Press Ctrl+Alt+T

Run it:

sudo -i
fdisk -l

Suppose fdisk say: / is /dev/sda1, continue running:

mount /dev/sda1 /mnt
mount --bind /dev /mnt/dev 
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
passwd

And change your root password and try not to forget

Finally run

umount /mnt
reboot
kyodake
  • 15,052
  • 3
  • 40
  • 48