Debian Linux unused in 2 years; cannot remember username nor password

0

I have tried every page I found on the web about resetting a username to something I could know (been 2 years since I've used the laptop with that Debian). Nowhere do people show the Debian GNU Grub window I get and nowhere do I find the description in the Grub listing that correspond to my version so I will ask you to help me:

my GNU GRUB version is 1.99-27+deb7u2

the text I get when I press the ''e'' button in the boot of GRUB where I can choose normal or recovery mode of Debian is the following (from the first line once I have pushed "e", it reads like this) :

setparams 'Debian GNU/Linux, with Linux 3.2.0-4-686pae'

load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos1_')
(there is a long line with the linux info once more.. is this the kernel line?
and more that i coul retype if needed)

... then there is that line at the end :

initrd "boot"initrd.img-3.2.0-4-686pae
(is this the kernel line?)

======== Literally ZERO guides on the web explain how to edit THIS Grub to add the line they tell us to add (init = /bin/bash)... or to put 'single' without quotes at the end of the kernel line, nowhere is the word kernel there. and every guide where people ask others to help with their Debian ends up sending them to a page talking about a Ubuntu or another version not a Debian one. So the text we see is nothing like the others. I tried adding the init line to my code I listed above, just after the setparams line... and it did nothing. If I boot in recovery mode, it asks me to put the login name in bash mode, and I still can't remember what I had put 2 years ago even if I see a login prompt in bash versus as in GUI.

This Debian has no documentation from the pages I looked up on the web that were talking about the same problem.


I retried and this time making sure that no " / " was located after the init='/bin/bash' ...

now it says : 'bash : cannot set terminal process group (-1) : Inappropriate ioctl for device'
(sic : it does say ioctl, i'm not mispelling)

and

'bash : no job control in this shell'

and leaves me with a prompt :

root@(none):/#

Now i have officially done what i could and will have to wait for news!

Alex Hébert

Posted 2017-08-12T04:29:31.820

Reputation: 1

Unless you've encrypted your laptop harddisk, a simpler way to reset the password is to boot from an USB stick (e.g. with a SystemRescueCD image), and just edit /etc/passwd and /etc/shadow. Alternatively, take the harddisk out, connect harddisk to another PC, then edit. Convincing grub to boot into /bin/bash as init process sounds ... interesting.

– dirkt – 2017-08-12T07:29:30.547

Method 2 Root Password Reset

– GAD3R – 2017-08-12T14:03:03.440

Answers

0

Yes, the kernel line is the one which loads the kernel image – it usually has a mention of vmlinuz or bzImage; the whole line might be prefixed "kernel" or "linux" or similar.

In GRUB, the same line also specifies kernel boot options. If you see root=/dev/... or root=UUID=..., that's the right place. Add new options at the end.

user1686

Posted 2017-08-12T04:29:31.820

Reputation: 283 655

i will be trying this and seing which line resembles that which you indicate mentionning "linux", or would it be the line: set root ='(hd0,msdos1)' ? I'll try those and give news – Alex Hébert – 2017-08-12T06:11:26.423

there was a line starting with /linux/, parameters ended on the 2nd line of description... i added 'single' without the << ' ' >> , and then i rebooted with the CTRL+X that the Debian menu indicated to use... it rebooted and asked for root pasword to enter maintenance mode, or do CTRL+D, which i did and it booted back to the "Login / Pswd" GUi prompt... i'll try the other line with "set root=" and add 'single' at the end... or then try the command line i saw mentionned in the GRUB last time i booted it – Alex Hébert – 2017-08-12T06:19:22.007

ok didn't work either : when i pushed escape to return to the Grub menu where i can pick 'debian' or 'debian (recover)', it said to use CTRL+C to get to a command line. A line that has the GRUB> prompt displayed... tried the "passwd" operation and it didn't work, i've not seen other indications for now, will wait for you or someone to give news – Alex Hébert – 2017-08-12T06:27:38.477

ok didn't work at first... but i retried and used the << ` >> around the parameter correctly and it booted single mode... or not... says "target filesystem down't have requested /bin/bash" BusyBox v1.20.2 (Debian 1:1.20.0-7) multi-call binary.

and at the bottom of the screen a list of [ 5.105181 ] lines with the 1st of them mentionning "Kernel Panic - not syncing : Attempted to kill init!" – Alex Hébert – 2017-08-12T06:36:20.637