Some people say you won’t need to use root account anymore in Ubuntu. That’s why Ubuntu doesn’t activate root account for default install. In my opinion they want to make Ubuntu more secure. Since Ubuntu now is user-friendly and not just for developer or other computer geek, end-user or even a newbie can use Ubuntu. But not for me, i need root account, because it’s more convenient for me to configure or and do setting on an Ubuntu machine. Imagine if i don’t use root account to configure an Ubuntu machine, i have to type ‘sudo’ every session to configure the Ubuntu.
But sometimes you forget your root password, maybe you barely use it or your admin is out and you have to replace him as administrator but he/she doesn’t tell you the root password. No what you have to do? Re-install? I wouldn’t do that, because re-install will make more job unless you think it really necessary and you know what you are doing.
You can recover/change your root password if you have the machine in front of your eyes, i mean you own the machine. So if you looking for how to hack someones server from the network, this article is not for you.
How to recover root password in Ubuntu:
- You need to reboot your Ubuntu
- When you reach GRUB page, press ‘e’ (with quotes), this command is to edit grub
- Edit one of your boot command
- Add this command to the very end of that boot command: rw init=/bin/bash
- Press enter and boot your system, that command will make your Ubuntu to boot with passwordless root shell
- Then just change your password with passwd username command. If it is root just type: passswd root
- Reboot your system
Now your root password have changed and you can use it. That’s it. Thanks for reading and have a nice day… upss, don’t forget to leave any comment lol. Thanks.