View previous topic :: View next topic |
Author |
Message |
General_Dark n00b
Joined: 03 Nov 2007 Posts: 10
|
Posted: Sat Nov 15, 2008 9:49 pm Post subject: Unable to "su" |
|
|
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 |
|
|
dmpogo Advocate
Joined: 02 Sep 2004 Posts: 3264 Location: Canada
|
Posted: Sat Nov 15, 2008 10:14 pm Post subject: |
|
|
On a side note, next time use 'cp -pr' |
|
Back to top |
|
|
spindle Apprentice
Joined: 01 Dec 2003 Posts: 245
|
Posted: Sat Nov 15, 2008 10:31 pm Post subject: |
|
|
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 |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Sat Nov 15, 2008 11:18 pm Post subject: |
|
|
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 |
|
|
notHerbert Advocate
Joined: 11 Mar 2008 Posts: 2228 Location: 45N 73W
|
|
Back to top |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Sun Nov 16, 2008 2:55 am Post subject: |
|
|
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 |
|
|
|