You are not logged in.

#1 2008-12-03 04:28:30

scrawler
Member
Registered: 2005-06-07
Posts: 318

can't su [solved]

I mangled something, because I am no longer able to "su".

I can log in as root, but if I try to su to root I get "incorrect password."
I can also, strange as it is, do "sudo su" and get a root promt like that.

My entire /bin directory is copied straight from the arch install cd (don't ask).

So anyway, is this mess fixable or what?

Last edited by scrawler (2008-12-03 13:53:57)

Offline

#2 2008-12-03 04:58:20

monstermudder78
Member
Registered: 2008-05-18
Posts: 120

Re: can't su [solved]

Nevermind, I have no idea.

Last edited by monstermudder78 (2008-12-03 04:59:13)

Offline

#3 2008-12-03 07:07:07

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: can't su [solved]

su isn't aliased to something else like "su username", is it? Try su -l root.

Since you copied /bin over manually, what are the permissions of /bin/su? It should be r-sr-xr-x (and owned by root, of course).

Last edited by B-Con (2008-12-03 07:07:22)

Offline

#4 2008-12-03 07:09:58

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,500
Website

Re: can't su [solved]

Are you sure the password you are trying is correct?  You could try changing it using your "sudo su" method.

Offline

#5 2008-12-03 07:49:44

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: can't su [solved]

Maybe a

pwunconv ; pwconv

(as root) does the trick.

Last edited by Stefan Husmann (2008-12-03 07:50:13)

Offline

#6 2008-12-03 12:12:26

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,223
Website

Re: can't su [solved]

Recently I have encountered something similar, but I have no idea if it is related:

Sometimes I have to press ENTER twice after entering 'su', and again twice after entering the password. I have no idea what to do to reproduce it (otherwise I would have filed a bug), but it seems limited to the su-command.

Offline

#7 2008-12-03 13:01:43

scrawler
Member
Registered: 2005-06-07
Posts: 318

Re: can't su [solved]

nothing so far.  thanks for the suggestions.

permissions for /bin/su are -rwxr-xr-x

r-sr-xr-x -- what is the octal representation?

Offline

#8 2008-12-03 13:26:12

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,500
Website

Re: can't su [solved]

It would be easier just to reinstall coreutils in case permissions are wrong elsewhere to.

This page gives you information on the "s" bit of the permissions: http://www.zzee.com/solutions/linux-permissions.shtml

Offline

#9 2008-12-03 13:53:37

scrawler
Member
Registered: 2005-06-07
Posts: 318

Re: can't su [solved]

ta daaaa!  I reinstalled coreutils.  su lives again.
thanks!

Offline

#10 2008-12-04 09:44:22

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: can't su [solved]

It was probably that "s" bit. That "s" bit makes the executable run with the permissions of the file's owner. /bin/su must run with root permission, otherwise it has no authority to give you a root shell. /bin/su is owned by root and has to have that "s" bit set, but without that special bit, /bin/su wasn't running with root's permission. sudo su worked because sudo itself was getting and passing along root's authority.

Offline

#11 2008-12-04 19:10:28

scrawler
Member
Registered: 2005-06-07
Posts: 318

Re: can't su [solved]

ta daaaa!

I just noticed that fits rather nicely with my current avatar...

Offline

Board footer

Powered by FluxBB