What if you forgot your password?

What would happen if you forgot your login password, or even your root password? I was thinking about this today because Manjaro was displaying another one of those many small hiccups that seem to be typical with most linux distros. It gave me the logon screen when I told it not to do that. I had to enter a password, or it wasn't going to let me in. I remember telling it to never do this when I first installed the OS. It was something that I was glad to have.

I never set up any logon password, because I want the computer to just go straight into the desktop when powered on. I'm the only one that has access to this computer, and I'm just sort of learning linux on it for awhile. There's nothing stored on it that is of any consequence, I just save it all on a big flash drive that wouldn't be affected by some kind of bad problem with the OS.

But I would like to think that I won't have to do that forever. That once I'm "good at" linux, I'll be able to save anything and everything on the main drive (if I so desire) and not have to worry about something like being locked out of the computer. Luckily, it accepted the root user password for the login that I never set up. I'm guessing that you could have two separate passwords if you wanted to? One for root, one for logon. So it feels to me like I got pretty lucky today, that the OS was nice enough to hiccup in a way that let the root password be the logon password. Because I never had anything to do with that.

Would I be able to recover my distro if it was asking for a password that I didn't know?

Nothing special. Boot with a live USB and copy all your data to a backup location and reinstall the system.

A worse scenario is if you encrypted your partition and forgot that password.

maybe will work in grub choose the entry of ever and touch the "e" letter to edit and in the linux line you go to the end and put init=/bin/bash and press ctrl+x to boot
then when its booted write
$mount -o remount,rw /
and change passwd of any user you want
then
$reboot -f

i dont know for sure if this work on manjaro but you should try

if you have a problem with the file system you should try in a live cd
$fsck /dev/sdxy
too

Source: https://wiki.archlinux.org/index.php/Reset_lost_root_password

  1. Boot the LiveCD and mount the root partition of your main system.
  2. Use the passwd --root MOUNT_POINT USER_NAME command to set the new password (you will not be prompted for an old one).
  3. Unmount the root partition.
  4. Reboot, and enter your new password. If you cannot remember it, go to step 1.

Replace MOUNT_POINT with the mount point where you mounted the root partition, and replace USER_NAME with the username for which you want to change the password.

6 Likes

This is the easiest method of changing forgotten passwords. If you have physical access to the system, passwords without encryption offer very little protection.

Either...

  1. I forgot my forget-me-not pills, or
  2. I did not forget my forget-me-not pills and should stay far, far away from computers in general? :wink:

My system is likely spooged but I can recover my data...unless that's encrypted and I CRS about it either. Then I should see #2 above.

Oh, you mean your system?

I think that's already been covered. :smiley:

NOTE: Just trying to lighten the darkness a wee bit. No need to pucker-up, anyone. :wink:

Thank you for the reply but unfortunately to do that would be to scrap about a month's worth of work on the OS itself. For example I'm very "good at" windows and it will still take me about 7 hours to get a windows install all set up just the way I like it. I'm still working on manjaro in that respect since I'm new, but I can imagine there being even more time needed to get it all set up properly.

Since KDE (and distros in general) are much more configurable than windows, you might actually be looking several days worth of work to get it all set up. That's once I'd become pretty knowledgeable. For someone new as I am now... yeah I've been working on it for over a month and I'm still not finished. Maybe I do a lot more tweaking on it than most people do, who knows.

You can save your config files as well. But it is still work. Therefore write down you passwords and hide them somewhere.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by