Problem using "su" command
I'm trying to use a non-root username to login to my server using ssh, but when I log in and then try to switch to super-user I get this:
user1@properganda ~ $ su root su: Authentication failure Sorry. I've had a look at chmodding the "su" command to 755 etc, but that doesn't solve the issue and I don't beleive it should be necessary. Any ideas? |
What system is this? If Ubuntu, it does not allow root login (actually the root account is locked) and you should use sudo instead. Also, have you been prompted for password?
|
It's gentoo.
Root login is allowed but to harden security I want to disallow it. I thought "sudo" was only a debian/ubuntu thing, but will give sudo a try. |
In gentoo, I think the user must be in the 'wheel' group do have root access.
|
Also, check if the suid bit of /bin/su is set:
Code:
ls -l /bin/su |
Thanks for the help guys, I ran this line as root:
gpasswd -a user1 wheel and then logged in as user1 and ran the su command but still get the authentication failure. |
Quote:
|
he is pointing out the lower case 's' where you would expect an x (-rws instead of -rwx)
which would mean that the bin is executed as the user owning the file, not the user calling the command a must for su |
thanks, well I've got
"-rwx--x--x 1 root root 25084 2008-01-17 19:23 su" So that would seem to be ok. |
Thanks Nathanael, I should have used a more visible color:
Code:
-rwsr-xr-x 1 root root 28336 Apr 17 2007 /bin/su Code:
chmod +s /bin/su |
Quote:
looks to me like you muddled up a little with your chmod experiment you mentioned in one of the earlier posts.... |
All times are GMT -5. The time now is 09:33 PM. |