LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I've screwed up my access as root (https://www.linuxquestions.org/questions/linux-newbie-8/ive-screwed-up-my-access-as-root-432795/)

mike150160 04-07-2006 04:12 PM

I've screwed up my access as root
 
Linux version 2.6.12-1.1381_FC3 on a dell C600 laptop BIOS A23

My root password is working for those applications that require it. But I can't su i get "su: /bin: Permission denied"

And if I log in as root it dumps me in a few seconds.

Any ideas?


Thanks

Zmyrgel 04-07-2006 04:15 PM

In some distros your user need to belong in to a "wheel" group, in order to use "su".

mike150160 04-07-2006 04:17 PM

I have previously had no trouble with either su or logging in as root. I've done something but I don't know what. I was playing about with "chsh" just before. Do you think that's relevant?

Tinkster 04-07-2006 04:26 PM

Quite likely ... what did you chsh to? And whose shell did
you modify?

Quick fix: chsh the users shell as root (or edit /etc/passwd
directly ... ;})...

Cheers,
Tink

mike150160 04-07-2006 04:36 PM

Ohhh K. You did see the newbie bit?

It's a single user system so I assume I just changed my user shell. I changed from bash to sh and back. Doesn't your quickfix require me to log in as root? If I could do that I wouldn't have a problem.

How would editing /etc/passwd help? The password works for any system apps that require root access but I can't login as root.

mike150160 04-07-2006 06:38 PM

I think I'm really stuffed. I can't change anything unless I'm "root" and I can't get su to work or login as root. Should the first line of /etc/passwd be:

root:x:0:0:root:/root:/bin

?

Or should it be root:x:0:0:root:/root:/bin/bash ?

btmiller 04-07-2006 06:47 PM

Oh, you changed root's shell to /bin -- that's rather bad since /bin is a directory, not a shell. Try using su with the -s option to specify a real shell, e.g. /bin/bash.

Tinkster 04-07-2006 07:15 PM

If that fails there's always the option of booting with a CD
in rescue mode and editing root's shell from there ...
Note: the su on slack doesn't have a -s option.

Cheers,
Tink

mike150160 04-08-2006 06:21 AM

Quote:

Originally Posted by Tinkster
If that fails there's always the option of booting with a CD
in rescue mode and editing root's shell from there ...
Note: the su on slack doesn't have a -s option.

Cheers,
Tink


Thanks Loads. I did the rescue thing and I can log in as root and am ALL POWERFUL. SOON YOU WILL COWER BEFORE ME BWA HAHAHAH!

Sorry...

... got carried away.

Thanks again

mike150160 04-08-2006 06:23 AM

Whats the affero thing? I clicked but just got http://www.avira.com/?

Tinkster 04-08-2006 03:43 PM

My bad ... must have somehow screwed up the link in the
sig :) ... try again!

Affero is a rating system for open-source supportniks.


Cheers,
Tink


All times are GMT -5. The time now is 04:56 PM.