Root Account and Single User Mode

To discourage people to use the root account, by default some distro such as Ubuntu don’t set a password for the root user. This way people cannot login with the root account directly. However, without setting a password for root user, people can log into single user mode (aka recovery mode) with the root account without password, and then the user can do anything including change the password of any users.

You should set a password for the root user even if the distro doesn’t tell you to do so during the installation. If you haven’t set up a password for the root user yet, you can do so by typing sudo passwd root and type the new password. Once you set the password for the root user, next time you log in to single user mode or recovery mode, it will ask you for root’s password instead of just let you in.

2 thoughts on “Root Account and Single User Mode”

  1. Good morning, I was searching for a totally different kind of thing and i spent such time to visit all around. I only post this now, but this so good article on this page is so impressive, that I just have thing to say to you thanks for this very instersting point of view and thanks again for all the great works you did for this article here.See you

  2. Great article, I just given this onto a co-worker who was doing a little research on that. And he in fact purchased me lunch because I discovered it for him� :) .. So let me reword that: Thanks for the treat! But yeah Thankx for taking the time to talk abo

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: