su doesn't accept my password
For some reason when I run 'su' and type the root password, it says it's incorrect, but it isn't. This didn't happen all of a sudden; I've never been able to get su to work. What could be causing this? I'm getting tired of constantly having to log out and log back in as the root.
I just tried running "passwd" as my user account, and when it prompted me for my current password, it said it was incorrect too! This is strange. Both passwords have both lowercase and uppercase letters, and some numbers and punctuation marks, if it matters. |
Do you set a different keyboard mapping when you log in? Try typing the password in a terminal window or somewhere else where you can see it.
Martin |
No, it's just the regular U.S. English layout. It would be nice if I could see what password it thought I was entering... that stuff isn't logged anywhere, by any chance, is it?
|
I really don't think that is logged anywhere. It's bad security practice. If you just mis-type the password with one character it would be fairly easy to guess the password (especially if this happens twice with different characters mis-typed). The real password is not stored in unencrypted form anywhere either. The only thing stored is the encrypted password string and when you log in your password is encrypted and compared to the stored encrypted password.
Every failed attempt at su-ing is stored like this (in /var/log/messages) Code:
Oct 13 12:19:27 charlene su(pam_unix)[20923]: authentication failure; logname= uid=500 euid=0 tty= ruser=martin rhost= user=root Martin |
I typed the password regularly; it's definitely registering correctly. And the login window works fine, it's just terminal stuff like su and passwd that do not. Well, that's not quite true -- as root, I can run "passwd" which doesn't ask me for my existing one, just asks me to enter the new one. That works fine. But as a regular user, trying to change my password fails the password check, and trying to su to root also fails.
I just now experimentally set the root password to 'abc', logged in as the user account, and still su fails! It can't possibly think I'm typing anything other than 'abc' and the root password definitely was changed to that, so perhaps the account somehow doesn't have permission to use su? Or something? Of course that doesn't explain why changing its own password doesn't work either. |
:scratch: :scratch: :scratch:
:D *ding* Is the sticky bit set for su? Code:
[root@charlene log]# ls -lF /bin/su Martin |
try a different shell
I have no idea why this wouldn't work, but I'm sure it must be a pain.
I have a suggestion: In order to rule out the shell itself as the cause of the problem, try using a different one. Most distros come with a number of shells installed. Oh, and make sure you are typing "su_-" (underscore is a space). I used to get all sorts of strange errors when I would leave out the -. You could also try typing "su - root". If that's not it, we are going to have to start looking at etc/pam.d to make sure your password files are correct and shadow passwords are set up correctly. Michael |
Quote:
|
All times are GMT -5. The time now is 02:04 AM. |