Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to "su"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
General_Dark
n00b
n00b


Joined: 03 Nov 2007
Posts: 10

PostPosted: Sat Nov 15, 2008 9:49 pm    Post subject: Unable to "su" Reply with quote

Hey!
Everytime I try to run "su" as the normal user (user added to wheel) I get Authentication error.
Ok, so. I just misstyped I thought. So I changed my sshd config to enable root login.
Typed the password in a textdocument, copied it and pasted it when promted for the password for root, worked like a charm.
So I opened up another ssh session and logged in with the normal user, typed su and pasted the very same password and got Authentication failed.

I think it has something to do with filepermissions since I had to reformat the drive cause I ran out of inodes. To save some work I "dd:d" the drive to another drive, formatted the first drive and then copied (with cp -r * @ /) back to the first, newly formatted drive.
Hence root created all files and got ownership.
But what files could have the wrong permissions? the su-binary looks like this:
Code:
-rwx--x--x  1 root root  26772 Nov 15 18:46 su


My /etc/group wheel-line looks like this:
wheel::10:root,[my username]

Ofc its the actual username instead of brackets and stuff, I'm just abit paranoid;)

Any ideas where the problem can be?
Thx in advanced
Back to top
View user's profile Send private message
dmpogo
Advocate
Advocate


Joined: 02 Sep 2004
Posts: 3264
Location: Canada

PostPosted: Sat Nov 15, 2008 10:14 pm    Post subject: Reply with quote

On a side note, next time use 'cp -pr'
Back to top
View user's profile Send private message
spindle
Apprentice
Apprentice


Joined: 01 Dec 2003
Posts: 245

PostPosted: Sat Nov 15, 2008 10:31 pm    Post subject: Reply with quote

The su binary needs the suid bit on, like this,
Code:
$ ls -l `which su`
-rws--x--x 1 root root 30868 2008-02-26 10:09 /bin/su


You can try setting this bit or maybe just re-emerging shadow to make sure nothing else is weird with su,
Code:
# emerge -av1 shadow


I concur with dmpogo. You should have gone with 'cp -rp' or rather 'cp -a'. You probably have a bunch of other files with permissions messed up now.
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2719
Location: here, there or in transit

PostPosted: Sat Nov 15, 2008 11:18 pm    Post subject: Reply with quote

I'm sure this exact problem has been addressed before but I can't find it, so I'll spare this from eviction to Duplicate Threads. :|

Although the cause differs, this thread discusses a situation with the same end result: damaged file permissions and/or ownership. Your system is subtly broken. You may see odd misbehavior from time to time until you completely rebuild it as discussed in the referenced thread.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
notHerbert
Advocate
Advocate


Joined: 11 Mar 2008
Posts: 2228
Location: 45N 73W

PostPosted: Sat Nov 15, 2008 11:46 pm    Post subject: Reply with quote

It's in the Installing Gentoo Stickies https://forums.gentoo.org/viewtopic-t-11126.html :P
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2719
Location: here, there or in transit

PostPosted: Sun Nov 16, 2008 2:55 am    Post subject: Reply with quote

I remembered the sticky but I was thinking specifically of the cause (copy w/o preserving permission)--I could swear I saw it discussed.... No matter, this is close enough. Thanks notHerbert.

Moved from Networking & Security to Duplicate Threads. See Why can't I su to root?, especially Q1.2.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum