Page 1 of 1

Debian 9.1 root password

Posted: Sun Jul 23, 2017 2:37 pm
by Thin Man
Greetings Esteemed fellow Gerbils. By chance is anyone else here fighting with Debian 9.1? Seems to be a problem with it accepting the root password that was entered at install. Ive done some searching and found it's not uncommon, but didn't find a lot in the way of answers to the problem. 9.0 had some problems too. Hence-9.1. Debian seems to have some difficulties since Mr. Ian's passing, hope things get straightened out.

Re: Debian 9.1 root password

Posted: Sun Jul 23, 2017 2:42 pm
by whm1974
I didn't know that Debian's found had died. Sad to see to him go, he will be missed.

Re: Debian 9.1 root password

Posted: Sun Jul 23, 2017 2:44 pm
by just brew it!
Have you tried booting into single user / recovery mode and resetting the password from there?

Re: Debian 9.1 root password

Posted: Sun Jul 23, 2017 2:49 pm
by Thin Man
Have you tried booting into single user / recovery mode and resetting the password from there?


That will be my next attempt. So far it won't accept the root password to do anything. Thought I'd ask before I floundered around too much. Thanks for the suggestion.

Re: Debian 9.1 root password

Posted: Sun Jul 23, 2017 2:53 pm
by Thin Man
whm1974 wrote:
I didn't know that Debian's found had died. Sad to see to him go, he will be missed.


Dec. of 2015 he apparently committed suicide. Yes sad case.

Re: Debian 9.1 root password

Posted: Sun Jul 23, 2017 5:55 pm
by just brew it!
Thin Man wrote:
Have you tried booting into single user / recovery mode and resetting the password from there?

That will be my next attempt. So far it won't accept the root password to do anything. Thought I'd ask before I floundered around too much. Thanks for the suggestion.

Turns out you need the root password for recovery mode too. :oops:

Here's how to get around that:

1. Boot system, and hit "e" at the grub menu before the system starts to load. You will get a screen where you can manually edit the system boot options.

2. Find the line that starts with "linux /boot" and add a space, followed by "init=/bin/bash" to the end of that line. Note: line may wrap around on the screen, make sure you're REALLY at the end!

3. Hit F10. System should boot into a root shell.

4. Enter the command "mount -rw -o remount /". This makes the root file system writable so you can change the password.

5. Use the "passwd" CLI utility to reset the root password.

6. Type "sync".

7. Reboot the system.

Re: Debian 9.1 root password

Posted: Sun Jul 23, 2017 6:21 pm
by Thin Man
just brew it! wrote:
Thin Man wrote:
Have you tried booting into single user / recovery mode and resetting the password from there?

That will be my next attempt. So far it won't accept the root password to do anything. Thought I'd ask before I floundered around too much. Thanks for the suggestion.

Turns out you need the root password for recovery mode too. :oops:

Here's how to get around that:

1. Boot system, and hit "e" at the grub menu before the system starts to load. You will get a screen where you can manually edit the system boot options.

2. Find the line that starts with "linux /boot" and add a space, followed by "init=/bin/bash" to the end of that line. Note: line may wrap around on the screen, make sure you're REALLY at the end!

3. Hit F10. System should boot into a root shell.

4. Enter the command "mount -rw -o remount /". This makes the root file system writable so you can change the password.

5. Use the "passwd" CLI utility to reset the root password.

6. Type "sync".

7. Reboot the system.



Yes, I was afraid that would be the answer. Was foolishly thinking I could get away easier, not that it's really that hard, but one tends to expect to not have to do the cli dance with an update that's supposed to fix problems rather than add them.
My fault though, I've been at this long enough to know better. As they say " Ubuntu, an ancient African word that means Help, I can't configure Debian"
Thanks for taking the time to help though. :D

Re: Debian 9.1 root password

Posted: Sun Jul 23, 2017 6:29 pm
by just brew it!
On the bright side, it's really a generic set of instructions for recovering from "I don't know the root password" situations, regardless of how you got there. :wink:

Re: Debian 9.1 root password

Posted: Sun Jul 23, 2017 7:18 pm
by Thin Man
just brew it! wrote:
On the bright side, it's really a generic set of instructions for recovering from "I don't know the root password" situations, regardless of how you got there. :wink:


Quite true. And at my age anything that helps the memory is good. :lol:

Re: Debian 9.1 root password

Posted: Mon Jul 24, 2017 7:56 am
by notfred
Alternatively use a live USB image and boot that (via BIOS boot menu), then in the live image you can become root (sudo su), mount the hard drive and go vi the mounted etc/shadow file to clear the root passwd. Reboot and then set the root passwd to what you like. Or rather than editing the etc/shadow you can chroot to the mounted partition and then run the passwd utility.