My (user) root password doesn't work

Hi there!
I have some problem with entering su mode and running applications (like YAST2) which require administrator privileges.
The password I’ve been using stopped working, I don’t know why. It’s not an issue of the keyboard or case-sensitivity, or inappropriate symbols or whatever.

I’ve already tried to change my password in recovery mode. I changed it, and after booting got the same message - “incorrect password”.
When I use terminal while in the system, this is what I get:

taras@linux-a8mm:~> su
Password: 
Permissions on the password database may be too restrictive.
su: incorrect password
taras@linux-a8mm:~> passwd
Changing password for taras.
Old Password: 
passwd: Authentication failure
taras@linux-a8mm:~> 


Is there any way to fix this except for reinstalling the system?.. Any help would be appreciated…

Linux 3.4.6-2.10-desktop x86_64
System: openSUSE 12.2 (x86_64)
KDE: 4.8.4 (4.8.4) “release 2”

By the way, I don’t know if it matters, but my system time and date are incorrect (creates certificate problems with internet pages)
And when I open Kwallet I cannot see any passwords there. Not any. I don’t know if there’s something wrong with it…

[quote="“piramidion”]

Permissions on the password database may be too restrictive.

That suggests a problem.

What’s the output from:


ls -l /etc/passwd /etc/shadow
-rw-r--r-- 1 root root   2025 Apr 10 17:05 /etc/passwd
-rw-r----- 1 root shadow 1229 Apr 10 17:05 /etc/shadow

(I gave my output for comparison).

Also, are you using NIS or LDAP or some other database for passwords?

Usually this sort of problem can be fixed without a reinstall, but it might require booting the install DVD or CD in rescue mode.

Then it must be way off. A few hours off normally doesn’t cause certificate problems. And you can’t set the date correctly until you have root access.

There won’t be anything there unless you put them there such as with a web browser. And some web browsers don’t use Kwallet.

In my case, I have a few added by rekonq. Kwallet tells me how many. I’m not sure whether I can tell it to show me the actual passwords.

Thanks for the reply!

What’s the output from:

ls -l /etc/passwd /etc/shadow

Here it is:

taras@linux-a8mm:~> ls -l /etc/passwd /etc/shadow
-rw-r--r-- 1 root root   1431 Feb  8 04:46 /etc/passwd
-rw-r----- 1 root shadow  840 Feb  8 04:45 /etc/shadow


Also, are you using NIS or LDAP or some other database for passwords?

I don’t know actually… How do I get to know this?

Usually this sort of problem can be fixed without a reinstall, but it might require booting the install DVD or CD in rescue mode.

I only tried to change my password in rescue mode, but it didn’t work. I mean, the password was changed, bot problem stayed the same…

Then it must be way off. A few hours off normally doesn’t cause certificate problems. And you can’t set the date correctly until you have root access.

Yes, i know that… My date is 11 FEB 2013

Just a stab in the dark: Are su and passwd suid root?

wolfi@amiga:~> ls -l `which su` `which passwd`
-rwsr-xr-x 1 root shadow 51328  5. Feb 15:58 /usr/bin/passwd
-rwsr-xr-x 1 root root   44288 27. Jän 09:28 /usr/bin/su

On 2013-04-30 12:36, wolfi323 wrote:

> Just a stab in the dark: Are su and passwd suid root?
>
> Code:
> --------------------
> wolfi@amiga:~> ls -l which su which passwd
> -rwsr-xr-x 1 root shadow 51328 5. Feb 15:58 /usr/bin/passwd
> -rwsr-xr-x 1 root root 44288 27. Jän 09:28 /usr/bin/su
> --------------------

Another one:


Telcontar:~ # grep PERMISSION_SECURITY /etc/sysconfig/security
PERMISSION_SECURITY="easy local"
# PERMISSION_SECURITY. If PERMISSION_SECURITY contains 'secure' or
Telcontar:~ #


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On 2013-04-30 12:26, piramidion wrote:

>> Also, are you using NIS or LDAP or some other database for passwords?
> I don’t know actually… How do I get to know this?

Well, if you are the one that installed the computer, you would know
that. If you installed it yourself and you don’t know, and we assume you
used the defaults, then the answer is “no”.

If you are using the machine in a corporate or university or lab
environment, and it was installed by the IT staff, then the answer is
probably “yes”.

>> Usually this sort of problem can be fixed without a reinstall, but it
>> might require booting the install DVD or CD in rescue mode.
> I only tried to change my password in rescue mode, but it didn’t work.
> I mean, the password was changed, bot problem stayed the same…
>
>> Then it must be way off. A few hours off normally doesn’t cause
>> certificate problems. And you can’t set the date correctly until you
>> have root access.
> Yes, i know that… My date is 11 FEB 2013

Enter the BIOS setup before Linux boots. Change the time/date in there,
save, and continue the boot process.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Just a stab in the dark: Are su and passwd suid root?

I guess so, since I’m the only user of this system (except root of course)

taras@linux-a8mm:~> ls -l `which su` `which passwd`
-rwxrwxrwx 1 root shadow 81808 Jul 16  2012 /usr/bin/passwd
-rwxrwxrwx 1 root root   44256 Jul 16  2012 /usr/bin/su

Another one:

Telcontar:~ # grep PERMISSION_SECURITY /etc/sysconfig/security PERMISSION_SECURITY=“easy local” # PERMISSION_SECURITY. If PERMISSION_SECURITY contains ‘secure’ or Telcontar:~ #

I don’t know if I got it right:

taras@linux-a8mm:~> grep PERMISSION SECURITY /etc/sysconfig/security PERMISSION SECURITY="easy local"
grep: SECURITY: No such file or directory
/etc/sysconfig/security:# PERMISSION_SECURITY. If PERMISSION_SECURITY contains 'secure' or
/etc/sysconfig/security:PERMISSION_SECURITY="easy local"
grep: PERMISSION: No such file or directory
grep: SECURITY=easy local: No such file or directory
taras@linux-a8mm:~> 

taras@linux-a8mm:~> grep PERMISSION_SECURITY /etc/sysconfig/security
# PERMISSION_SECURITY. If PERMISSION_SECURITY contains 'secure' or
PERMISSION_SECURITY="easy local"
taras@linux-a8mm:~> 



>> Also, are you using NIS or LDAP or some other database for passwords?
> I don’t know actually… How do I get to know this?

Well, if you are the one that installed the computer, you would know
that. If you installed it yourself and you don’t know, and we assume you
used the defaults, then the answer is “no”.

Yes, I installed it by using the defaults…

Enter the BIOS setup before Linux boots. Change the time/date in there,
save, and continue the boot process.

Ok, I’ll do that, thanks))

There is an under score in

PERMISSION SECURITY
PERMISSION_SECURITY

I tried it as well, but it gives me nearly the same (doesn’t make much sense to me)

taras@linux-a8mm:~> grep PERMISSION_SECURITY /etc/sysconfig/security PERMISSION_SECURITY="easy local"
/etc/sysconfig/security:# PERMISSION_SECURITY. If PERMISSION_SECURITY contains 'secure' or
/etc/sysconfig/security:PERMISSION_SECURITY="easy local"
grep: PERMISSION_SECURITY=easy local: No such file or directory
taras@linux-a8mm:~> 


No they are not. Compare again with my output:

-rw**s**r-xr-x 1 root shadow 51328  5. Feb 15:58 /usr/bin/passwd
-rw**s**r-xr-x 1 root root   44288 27. Jän 09:28 /usr/bin/su

That’s why they can’t read the password database…

So you should do:

chmod +s /usr/bin/passwd
chmod +s /usr/bin/su

to make them work again.

Or better do

chkstat --system --set

which should correct the permissions of all files on your system.

The problem is you must be root to do this.
I hope you can still log in as root! :wink:

Thank you very much! I logged in as root, typed commands like you said, rebooted and now everything works! I can access Yast and all the programs through my usual user account by simply typing in my password))  The problem is solved!    P.S: Time and date are correct now, I changed them in Bios, as I was told to above

If this is a older machine you might want to change the battery on the mother board. A weak battery can cause the hardware clock to be slow or random even.

On 2013-04-30 19:06, piramidion wrote:
>
> gogalthorp;2552555 Wrote:
>> There is an under score in
>>
>> PERMISSION SECURITY
>> PERMISSION_SECURITY
>
> I tried it as well, but it gives me nearly the same (doesn’t make much
> sense to me)

Notice that the command I posted was only:


grep PERMISSION_SECURITY /etc/sysconfig/security

You are joining in a single command line the command you should, and the
sample output that I got when I did it.

What it does is finding in the file “/etc/sysconfig/security” if there
is a line that contains “PERMISSION_SECURITY”, and print it. What I
expect to see is


PERMISSION_SECURITY="easy local"

If the contents would be:


PERMISSION_SECURITY="secure"

that would be your problem.

However, I see now on another post that you solved it, the permissions
of the passwd command were wrong.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Ok, thanks for the explanation)) I need to learn all that stuff to get more understanding of linux… Don’t wanna use Windows at all
P.S.: I get this:

taras@linux-a8mm:~> grep PERMISSION_SECURITY /etc/sysconfig/security
# PERMISSION_SECURITY. If PERMISSION_SECURITY contains 'secure' or
PERMISSION_SECURITY="easy local"


No, my machine is new and rather strong, The date now is correct, but I will remember your advice in case it goes wrong again. Thanks))