Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Last edited by CGameProgrammer; 10-13-2004 at 02:24 AM.
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)
But still, try to type in the password in a way that you can see it. Try typing the password from the login window too. To see the password, just enter the password in the username field. This way you should be able to see if there is something fishy with your keyboard mappings.
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.
Last edited by CGameProgrammer; 10-13-2004 at 05:42 AM.
[root@charlene log]# ls -lF /bin/su
-rwsr-xr-x 1 root root 19132 Aug 29 2002 /bin/su*
The 's' in the permissions is for the sticky bit. This means that the command is run with the privileges from the user owning the command, not the privileges of the user executing the command. Change the settings of the sticky bit with chmod.
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.
Originally posted by MartinN
Is the sticky bit set for su?
Code:
[root@charlene log]# ls -lF /bin/su
-rwsr-xr-x 1 root root 19132 Aug 29 2002 /bin/su*
The 's' in the permissions is for the sticky bit. This means that the command is run with the privileges from the user owning the command, not the privileges of the user executing the command. Change the settings of the sticky bit with chmod.
That fixed it! Thanks a lot. Everything works fine now.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.