LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-07-2006, 04:12 PM   #1
mike150160
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Rep: Reputation: 0
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
 
Old 04-07-2006, 04:15 PM   #2
Zmyrgel
Senior Member
 
Registered: Dec 2005
Location: Finland
Distribution: Slackware, CentOS, RHEL, OpenBSD
Posts: 1,006

Rep: Reputation: 37
In some distros your user need to belong in to a "wheel" group, in order to use "su".
 
Old 04-07-2006, 04:17 PM   #3
mike150160
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Original Poster
Rep: Reputation: 0
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?
 
Old 04-07-2006, 04:26 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 04-07-2006, 04:36 PM   #5
mike150160
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Original Poster
Rep: Reputation: 0
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.
 
Old 04-07-2006, 06:38 PM   #6
mike150160
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Original Poster
Rep: Reputation: 0
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 ?
 
Old 04-07-2006, 06:47 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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.
 
Old 04-07-2006, 07:15 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 04-08-2006, 06:21 AM   #9
mike150160
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 04-08-2006, 06:23 AM   #10
mike150160
LQ Newbie
 
Registered: Apr 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Whats the affero thing? I clicked but just got http://www.avira.com/?
 
Old 04-08-2006, 03:43 PM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Root Access un shiza Linux - Security 12 03-30-2005 07:46 PM
root access pazvant Linux - Security 4 03-12-2005 09:41 AM
Newbie screwed up and can't log as root anymore chumley115 Linux - Software 3 03-12-2004 02:20 PM
I am screwed...Cant enter Root password. bruce1271 Linux - Hardware 8 09-24-2003 02:53 PM
crazy root disk screwed me over? wwwc21 *BSD 2 08-02-2003 05:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration