From the course: Complete Guide to Navigating Linux: Working with Users, Files, and Networks

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Essential troubleshooting: Recovering the root password

Essential troubleshooting: Recovering the root password - Linux Tutorial

From the course: Complete Guide to Navigating Linux: Working with Users, Files, and Networks

Essential troubleshooting: Recovering the root password

- In this video, we'll do some essential troubleshooting. Resetting the root password. On Ubuntu, resetting the root password is surprisingly easy. You just access the GRUB2 boot prompt and you add systemd.unit=emergency.target. Then, you press Enter to continue, and then you type passwd to set the root user password. And from that moment on, your root user has a password. Let me show you. So, I'm going to reboot my system. Here's the GRUB boot menu, and I'm pressing E for edit. And again, I'm going to the end of the line that reads Linux where I'm using systemd.unit equals emergency dot, target. Control + X to start with that option. And like we have seen before, after pressing Enter, I'm in a root shell where I just have to type passwd. Going once, ignoring the arrow message about a weak password, going twice, and now the root user has a password and that's all.

Contents