Forgotten Username/Password

If none of the more specific forums is the right place to ask

Forgotten Username/Password

Postby InkGwin » 2018-01-13 18:05

Hi. I have a notebook in which I installed Debian 8 like an year ago. I spent some time without using it and now I want to use it again, but I tried all combinations of my name I could think of as username and not one has worked. I'm pretty sure of the password I would have used, but I looked for a way of changing it anyway, since it could be the problem.

I found some foruns saying I should boot in as single user, both to discover my username and to change the password, but the instructions given were to press "e", then find the line beginning with "kernel" and press "e" again. Only, after the first time I pressed "e", there was no line beginning with "kernel". I think the problem may be that all the instructions I found were from some years ago.

What should I do? Is there a way I can find out my username? And what about a way for changing the login password? (I mean without reinstalling debian all over again and losing data.)

Please note that I'm a newbie with linux, so beginners vocabulary would be welcome. :)

Thanks in advance!
InkGwin
 
Posts: 3
Joined: 2018-01-13 17:16

Re: Forgotten Username/Password

Postby Head_on_a_Stick » 2018-01-13 18:09

Charlie don't hack
User avatar
Head_on_a_Stick
 
Posts: 7637
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Forgotten Username/Password

Postby InkGwin » 2018-01-13 21:32

Head_on_a_Stick wrote:This solution is up-to-date:

https://superuser.com/questions/1017792 ... -on-debian


Thanks for answering! But still, that doesn't resolve my problem. That solution is the same one I found before, and I still have the same problem: after pressing "e" on the grub menu, I don't get a line for the kernel. What I get is something like 8 lines of "ifs" and "elses", but no "root" succeeded by "kernel" and so on. Because of that, I can't change the boot mode as suggested. Maybe I should change my question for "Is there another way of accessing this kernel line?" or "What am I doing wrong?". I just start the computer, wait until it gets on grub menu, and since debian is already selected by default, I press "e" and get the "ifs".
InkGwin
 
Posts: 3
Joined: 2018-01-13 17:16

Re: Forgotten Username/Password

Postby Head_on_a_Stick » 2018-01-13 21:54

InkGwin wrote:after pressing "e" on the grub menu, I don't get a line for the kernel

Yes, sorry, you're right, the link is a little unclear.

The line you want begins with "linux" ;)
Charlie don't hack
User avatar
Head_on_a_Stick
 
Posts: 7637
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Forgotten Username/Password

Postby InkGwin » 2018-01-15 08:29

Head_on_a_Stick wrote:The line you want begins with "linux" ;)


Okay, now I found that line! Don't know if that is important, but instead of
Code: Select all
quiet splash
there was only
Code: Select all
quiet
. I was able to do everything until the
Code: Select all
passwd
command. Now the problem seems a little bit different: after typing and retyping the password, there is an error:
"passwd: Authentication token manipulation error
passwd: password unchanged"

What does that mean? I tried several times in order to be sure I was retyping the password correctly.

I also tried to run the
Code: Select all
sync
command anyway, just in case, but it did nothing and now I'm stuck in the bash command prompt. :(
InkGwin
 
Posts: 3
Joined: 2018-01-13 17:16

Re: Forgotten Username/Password

Postby bw123 » 2018-01-15 15:55

InkGwin wrote:
Please note that I'm a newbie with linux, so beginners vocabulary would be welcome. :)



Well, you picked a nice tricky way to get started. If it was me doing it all over again, I would stick with a live cd/dvd and practice at the command prompt every day. You can explore the hd installation and access it's data, and if you are careful even save it for later.

If you go into the task not knowing what you are doing, and just typing in commands you find on the net without understanding, you may get in eventually. But by using a live install and taking it slow and using man pages you will learn a lot more. You can explore a working system on the live install and see how it works and compare it to the other.
User avatar
bw123
 
Posts: 3139
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Forgotten Username/Password

Postby golinux » 2018-01-15 17:26

InkGwin wrote:What does that mean? I tried several times in order to be sure I was retyping the password correctly.
The same password over and over? Maybe try a different password? And write it down so you'll remember . . . ;)
May the FORK be with you!
User avatar
golinux
 
Posts: 1343
Joined: 2010-12-09 00:56
Location: not a 'buntard!

Re: Forgotten Username/Password

Postby Head_on_a_Stick » 2018-01-15 17:51

Well, just looked at my link again and it turns out that it's shit, I must have been tired when I posted that :?

Anyway, here's a step-by-step guide:

Highlight the Debian entry in the GRUB (boot) menu and press "e" then add this to the end of the line that starts with "linux":
Code: Select all
init=/bin/bash

Then press <Ctrl>+x (at the same time) to boot the modified entry.

In the root shell, remount the filesystem read-write:
Code: Select all
mount -o remount,rw /

Then find your user's name:
Code: Select all
ls /home

Finally, reset the user's password:
Code: Select all
passwd $user

Replace $user with the actual user name that you discovered in the previous step.

Once that is done you can issue the `reboot` command and then log in as the re-discovered user with the new password.
Charlie don't hack
User avatar
Head_on_a_Stick
 
Posts: 7637
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to General Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable