I personally don't remember the time when I used a computer without a login password. Today we store all kinds of personal information on our computers and mobile devices, so it is a good idea to protect this information with a password that no one but us knows. But what if we forgot this password? Well, this can be a problem, unless you carry out the steps that we detail below and that you can find conducting an internet search.
In Unix-based operating systems we need a password to perform almost any task. This is a positive thing, since, in theory, almost no file has execution permission, but it must be recognized that sometimes it can be a nuisance to put both the password or, as far as this goes post, we have to memorize the administrator password if we do not want to have any problems. But if we have forgotten it, Not everything is lost; we can restore it.
How to reset admin password in Ubuntu
The steps to follow are very easy. I don't see what could go wrong and, besides, not being able to access our computer is the worst thing that could happen to us. If you are in that situation, you just have to:
- We restart the computer.
- When entering GRUB, we press the «e» key (edit).
- We go to the kernel line and enter the command rw init = / bin / bash behind the line, which will be as in the following image:
- After entering the above command, we press Enter.
- Now we press the «b» key (boot = start).
- The next time we start, we will be able to enter the computer without a password, so now we will have to create another one. Once started and entered the system, we open a terminal and write the command passwd Username, where we will have to replace "Username" with our username (mine is usually Pablinux).
- We press Enter.
- We introduce the new password.
- And finally, we restart the computer.
I hope you never find yourself in a situation where this information is useful to you, but if that is the case, at least you will be able to access your computer.
How unsafe!
If I remember correctly, it was also possible to change the password from recovery mode: https://wiki.ubuntu.com/RecoveryMode
Greetings.
I consider that an Ubuntu BUG
Damn it was something very simple ... What insecurity
Today, the security of an OS is determined above all by the difficulty of hacking it without physical access.
To apply this tutorial, you need physical access to the computer. And regardless of the OS, someone who knows a little computer science and has physical access will be able to remove the data you have with ease (who has not used a liveCD to recover data from a broken computer?)
The only way to have a secure system against physical access is to encrypt the hard drive.
And if it is encrypted, this tutorial is useless, since you cannot reset the disk encryption password.
So, although it seems insecure, it has little practical impact.
The one from supersx is the only sane comment I read in this post
Does this method also allow updates to download? I am a neophyte on these issues. Thanks.
Hi, my computer has Ubuntu Mate and I can't access GRUB (I pressed ESC, SHIFT, F2 at startup and nothing) I can't access my computer because I haven't used it for a long time and I can't remember the password. Could you help me? Thanks
How is the kernel line going? I can't change anything