root password is unrecognised

Help with issues regarding installation of Debian

root password is unrecognised

Postby samhain » 2017-04-15 17:22

I have just installed debian 8.7.1.

I can boot and log in and everything seems okay except...
The root password that I set during the install procedure is not recognised when I try to authenticate for an action that requires it.

I am certain that I am typing it correctly, caps lock is not on etc.

I would appreciate any ideas how to resolve this.
samhain
 
Posts: 9
Joined: 2017-04-15 17:09

Re: root password is unrecognised

Postby golinux » 2017-04-15 17:57

This has always worked for me. Does root PW work otherwise?
May the FORK be with you!
User avatar
golinux
 
Posts: 1254
Joined: 2010-12-09 00:56
Location: not a 'buntard!

Re: root password is unrecognised

Postby peter_irich » 2017-04-15 18:02

There are many methods. It also depends from that whether or not you have Live CD or can you or not boot in single mode without password.
1st try in google
how to reset root password in Linux

Peter.
peter_irich
 
Posts: 1194
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation

Re: root password is unrecognised

Postby samhain » 2017-04-15 19:09

The password reset instructions in the link above do not seem to apply here. I press 'e', then I get a screen headed 'Set params Debian GNU/Linux". Under that is what I take to be the grub parameters, or a script anyway. If I cursor down a few lines and press 'e' again it just echos 'e' to the screen.
At the bottom of the screen there is advice to press Ctrl-c or F2 for a command line, but that gives me:
grub>
Which doesn't look like what I need

I forgive you for suspecting so, because I probably would too, but I don't see this as a forgotten or mistyped password issue. I know this password well. There is a Debian v7 install on another disk on the same machine and I am using the same root password as that has. Also, let me say that, this exact issue happened before about a year ago. At that time I did the installation over several times assuming I had made a mistake. But I hadn't. In the end I gave up and installed Debian 7 again because that was known to work.

I seem to recall reading somewhere that if one doesn't enter a root password in installation, the user will be set as a sudoer instead? Is that true? Should I just try that and see what happens.
samhain
 
Posts: 9
Joined: 2017-04-15 17:09

Re: root password is unrecognised

Postby samhain » 2017-04-15 19:17

I do have a live DVD, that's what I installed from.
Can I use that some way?
samhain
 
Posts: 9
Joined: 2017-04-15 17:09

Re: root password is unrecognised

Postby wizard10000 » 2017-04-15 19:25

golinux provided the solution. I'd suggest you do that :)
we see things not as they are, but as we are.
-- anais nin
User avatar
wizard10000
 
Posts: 1204
Joined: 2011-05-09 20:02
Location: everywhere i go, there i am!

Re: root password is unrecognised

Postby debiman » 2017-04-15 19:28

root password or user password?

su = root password
sudo = user password.

it is possible to set a root passwd like this:
sudo su <--- enter user password here!
passwd root <--- enter desired root password!
User avatar
debiman
 
Posts: 1545
Joined: 2013-03-12 07:18

Re: root password is unrecognised

Postby samhain » 2017-04-15 19:42

it is possible to set a root passwd like this:
sudo su <--- enter user password here!
passwd root <--- enter desired root password!


But this is a new installation and the user account is not in sudoers by default, so I can't do that.
samhain
 
Posts: 9
Joined: 2017-04-15 17:09

Re: root password is unrecognised

Postby samhain » 2017-04-15 19:58

This has always worked for me. Does root PW work otherwise?


I did try the instructions given there but I suspect they may be for a different version of grub or something, anyway, what those instructions describe does not happen when I try them. The instructions say:

Boot to the grub menu. Then press <e> (for edit) before Linux has a chance to boot
Using your keyboard arrow keys, move the cursor down a line or so, and press <e> (for edit) again. You should now be on the Kernel line,

When I do that the first <e> shows a page headed "set params" with about a dozen lines of commands below, and when pressed, the second <e> just echos to the screen. What is meant by the 'Kernel line' in this instruction? Is it one of the lines of commands I am seeing?

No, root password does not work at all.
samhain
 
Posts: 9
Joined: 2017-04-15 17:09

Re: root password is unrecognised

Postby GarryRicketson » 2017-04-15 20:07

You are NOT editing the parameters, script,...like the instructions tell you


by samhain »I press 'e', then I get a screen headed 'Set params Debian GNU/Linux".Under that is what I take to be the grub parameters, or a script anyway. If I cursor down a few lines and press 'e' again it just echos 'e' to the screen.


Try reading the instructions more carefully,
you must find the line that is the "kernel line", it is pretty obvious be cause
it is the only line in the script mentioning the kernel, then you edit it, adding,
(appending) the "init=/bin/bash/code",...



Select the appropriate boot entry in the GRUB menu and press e to edit the line.
Select the kernel line and press e again to edit it.
Append
Code: Select all
 init=/bin/bash
at the end of line.
Press Ctrl-X to boot (this change is only temporary and will not be saved to your menu.lst). After booting you will be at the bash prompt.
Your root file system is mounted as readonly now, so remount it as read/write
Code: Select all
 mount -n -o remount,rw /.

Use the
Code: Select all
 passwd
command to create a new root password.
Reboot by typing reboot -f and do not lose your password again!


Note, I do not have UEFI,and never will, but I saw a note on that:
If you have a UEFI system it's the line that starts with linuxefi

So I don't know on that, maybe some of the UEFI users do.

And yes you can also do this using a live CD, there are many instructions
in the search results on that as well.
There are various ways to do this, if one does not work , try another.

I found this, you still need some minimal reading skills, but it is mostly pictures ,
Scroll down to method 2 "without root password"
http://www.wikihow.com/Change-the-Root-Password-in-Linux

==== note =====
y samhain » I did try the instructions given there but I suspect they may be for a different version of grub or something,

Well, then you need to tell us what version of grub you are using, you should have done that to start with, What makes you suspect this ? did you install a different version ?
I suspect the "or something", is something you have done , but are not telling us,
Is this really your computer ?
:mrgreen:
====== If all else fails =========
The above method, editing the grub, has worked for me as well, but if nothing else works, you could just re-install, and this time be sure you get the root password right, maybe even write it down on a piece of paper, or something,
keep it in you wallet,...
Last edited by GarryRicketson on 2017-04-15 20:34, edited 2 times in total.
"What we expect you have already Done"

Before doing anything, read the Debian documentation:
Debian Documentation
How to ask the smart way
Debian Foro Español
======================
For the Birds
User avatar
GarryRicketson
 
Posts: 4369
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: root password is unrecognised

Postby samhain » 2017-04-15 20:23

Well, then you need to tell us what version of grub you are using, you should have done that to start with, What makes you suspect this ? did you install a different version ?
I suspect the "or something", is something you have done , but are not telling us,
Is this really your computer ?


I will check the version of grub when I go reboot in a minute, it is whatever version is installed from the 8.7.1 live CD. What made me suspect was that those instructions, when followed, to the letter, did not produce the result that they lead me to expect. :D
I will try again using your helpful advice.
samhain
 
Posts: 9
Joined: 2017-04-15 17:09

Re: root password is unrecognised

Postby samhain » 2017-04-15 20:57

Well, then you need to tell us what version of grub you are using, you should have done that to start with, What makes you suspect this ? did you install a different version ?
I suspect the "or something", is something you have done , but are not telling us,
Is this really your computer ?


@GarryRicketson Thank you for the wikihow page and your hints. The instructions there turned out to be applicable. The first ones I tried were different and were not applicable to my version of grub.

I have been through the reset procedure, and set the original password again, everything went as expected.

It hasn't helped though. After logging in as the regular user, attempts to authenticate with the root password are still rejected, just as before. TBH I expected that.

The version of grub appears to be: 2.02~beta2-22 FWIW. Anyway that problem is solved.

"or something" is just my sloppy way of saying that I'm guessing and that I have been known to be wrong.

Yes it is my computer :D . Sadly. Right now I kind of wish it wasn't.

If nobody has any other ideas I will try reinstalling and not providing a root password at all, in the hope that this will set up the user account as a sudoer. Assuming that isn't an urban legend. I will report back.

(As I wrote above, the last time this occurred I tried reinstalling several times on the assumption that I had set the root password incorrectly during installation - and being very careful obviously - but that made absolutely no difference. So I do not believe that's an option. And it's why I didn't really expect resetting the password to work either.)

It's a b*tch having an "impossible" issue.
samhain
 
Posts: 9
Joined: 2017-04-15 17:09

Re: root password is unrecognised

Postby GarryRicketson » 2017-04-15 21:43

Wait a minuet, or more, don't try re-installing just yet.

by samhain » I have been through the reset procedure, and set the original password again, everything went as expected.

It hasn't helped though. After logging in as the regular user, attempts to authenticate with the root password are still rejected, just as before.


Can you give us more details, on what it is that is asking to authenticate with
the root pass word,... ?
At the terminal, if you type "su", you then need to enter the root password,

Yes it is my computer :D . Sadly. Right now I kind of wish it wasn't.


Ok, any way I was just kidding ....

If nobody has any other ideas I will try reinstalling and not providing a root password at all, in the hope that this will set up the user account as a sudoer. Assuming that isn't an urban legend. I will report back.

(As I wrote above, the last time this occurred I tried reinstalling several times on the assumption that I had set the root password incorrectly during installation - and being very careful obviously - but that made absolutely no difference. So I do not believe that's an option. And it's why I didn't really expect resetting the password to work either.)

I don't think that is a very good idea,, I have never tried that (not providing a root password), but I have seen some threads here where that leads to some problems.
Since you have tried several times, using this particular image,:
I have just installed debian 8.7.1.

Which actually it is not clear, What image (ISO) did you use,..? Trying it again
may just be a waste of time, all though not very likely, it is possible something
is wrong with the installer, and it is not receiving and setting the root password correctly,... another possible "or something",... I think I would try downloading
a different image, and makeing a new install media,... you also don't tell us about that, is it a USB device or CD, .. ? etc.
Last edited by GarryRicketson on 2017-04-15 22:42, edited 1 time in total.
User avatar
GarryRicketson
 
Posts: 4369
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: root password is unrecognised

Postby dasein » 2017-04-15 21:51

samhain wrote:If nobody has any other ideas I will try reinstalling and not providing a root password at all, in the hope that this will set up the user account as a sudoer. Assuming that isn't an urban legend. I will report back.

There are still things you can try, if you can bring yourself to focus on finding a solution rather than admiring your oh-so-special problem.

But first, you need ask yourself which scenario is more likely:

1) There is a secret bug in Debian 8 that prevents you and only you from setting/resetting your root password; according to you, this bug has been around for a year now, so the thousands of people who successfully install Debian every day are just incredibly lucky.

2) You make the same mistake every time you install Debian 8, and the installer fails to properly handle whatever that mistake is.

3) If you're using the same medium (or the same .iso) to install now as you used a year ago, it's certainly possible that either your .iso or your medium is corrupt. Have you verified the checksum on both the downloaded .iso file and the medium you're using? (At the risk of belaboring a point, verifying one without verifying the other is a waste of effort.)

With that out of the way, you need to realize that when you are in "single user" mode or "recovery" mode, you are root and can do anything root might otherwise be able to do, including editing /etc/shadow. So boot into recovery/single user mode and:
Code: Select all
cd /etc
cp shadow shadow-bak
<your-favorite-text-editor here> shadow

then...

- find the line for the root account

- delete everything between the first pair of colons (but leave the colons themselves intact).

NOTE: If you FUBAR this step, exit the editor without saving (or restore the backup file (shadow-bak) and try again.

- save the file

- reboot

At this point, your root account will have no password whatsoever, so su will not require you to enter a password. (You should fix that at your very first opportunity.)

(Edited for clarity/emphasis)
Last edited by dasein on 2017-04-16 01:49, edited 2 times in total.
User avatar
dasein
 
Posts: 7775
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: root password is unrecognised

Postby dilberts_left_nut » 2017-04-15 22:35

What language / kb layout are you using?
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 4691
Joined: 2009-10-05 07:54
Location: enzed

Next

Return to Installation

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable