LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't use su, root account fine. (https://www.linuxquestions.org/questions/linux-software-2/cant-use-su-root-account-fine-148847/)

viciousfish 02-21-2004 03:08 PM

Can't use su, root account fine.
 
I'm using SuSE 8.2.

I can no longer become root using the 'su' command. I enter my password, and I'm told that it is wrong.

I can log in as root from the standard login prompt just fine, using the same password. I've tried the su command 101 times, and I'm sure that the password is correct.

Is there some way that I could have set a different password for 'su' from the normal root password? Or could it be that my normal user account has somehow lost the ability to use 'su'?

I'm completely baffled by this, I've read every manual I can find...

b0uncer 02-21-2004 03:23 PM

no, I guess it's because of groups your user(s) are in. at least that's what caused the same thing on my own linux, when I did some stupid tricks with my groups... :) hehe..removed one user from all groups.

I think every user that can su to root must be in a certain group, so that those users who log in from a certain place couldn't have rights to this (through ethernet/net or something) due to security reasons. anyway, if I remember correctly, the group is called "wheel" (without quotes).

so try adding your user(s) to the group wheel and see if it helps :) it did at least for me...

EDIT: use a graphical tool or some "easy-to-use" if you can, but if you can't, here's the way to do it in terminal....(the way I managed to remove my user from all groups, heh..)

usermod -g group1,group2,group3,group4,...

(see "man usermod" -without quotes- for details). this sets the user into the given groups (must be root to do this?), so WATCH OUT: THE USER IS IN THE GIVEN GROUPS, NOWHERE ELSE! it means, the user is in the groups you list - if you list a group in which the user isn't already, the user is added to the group. BUT. if the user has been in a group but you don't list it here, the user is REMOVED from that group....so be sure you add it to all the groups you need.

and wheel is the group (if I remember right) that has access to "su" command....

viciousfish 02-22-2004 05:42 AM

Thank you, you pointed me in exactly the right direction, the problem was with the groups configuration.

However, it's not because the normal user isn't in the group 'wheel'. I think it is the group 'trusted' which actually did the trick, though I think I've tried adding the user to all the groups at some stage. It all works now anyway.

b0uncer 02-22-2004 03:04 PM

ok...then I must have remembered wrong or something. but good you found the right group.. for me it took some time when I tried different groups, because I didn't have a clue which caused the problem...and I also had another group which I needed but didn't know the name :/ well, everything's ok now...


All times are GMT -5. The time now is 08:58 AM.