LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-14-2002, 10:41 PM   #1
lhoff
Member
 
Registered: Jun 2001
Location: Chicago
Distribution: Mandrake 10.0 Official
Posts: 181

Rep: Reputation: 30
Can't SU ROOT in terminal


When I try to become superuser root, I get the error
File Size limit exceeded

and am then dumped back to the command line as my regular user ID.

What gives?

 
Old 03-15-2002, 01:51 AM   #2
isajera
Senior Member
 
Registered: Jun 2001
Location: San Antonio, TX
Distribution: distro? what's a distro?
Posts: 1,635

Rep: Reputation: 45
Re: Can't SU ROOT in terminal

Quote:
Originally posted by lhoff

What gives?
good question. that's a really weird error to get on su. what command are you using, exactly? whenever i go to root, i just type

su
*password*

and that's it.
 
Old 03-15-2002, 03:26 AM   #3
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 46
It's probably something to do with ulimit. Maybe it's reached the maximum limit so it can't write to the log files anymore. But I thought the ulimit couldn't be set for the user root. I can't find anything about that in the man pages though so maybe it is possible. Try ulimit -a to see what all your limits are set to.
 
Old 03-15-2002, 10:05 AM   #4
lhoff
Member
 
Registered: Jun 2001
Location: Chicago
Distribution: Mandrake 10.0 Official
Posts: 181

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Mik
Try ulimit -a to see what all your limits are set to.
ulimit -a
core file size (blocks) 0
data seg size (kbytes) unlimited
file size (blocks) 100000
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files 1024
pipe size (512 bytes) 8
stack size (kbytes) unlimited
cpu time (seconds) unlimited
max user processes 256
virtual memory (kbytes) unlimited

Nothing really obvious sticks out to me: do you see something?

Thanks!
 
Old 03-15-2002, 10:31 AM   #5
Sixpax
Member
 
Registered: Mar 2002
Distribution: Mandrake 8.1
Posts: 386

Rep: Reputation: 30
Are you able to login as root from a console?
 
Old 03-15-2002, 10:44 AM   #6
lhoff
Member
 
Registered: Jun 2001
Location: Chicago
Distribution: Mandrake 10.0 Official
Posts: 181

Original Poster
Rep: Reputation: 30
Yes, fortunately.

But, I can't login as the superuser in an X terminal. This is seriously cramping my style!

Thanks!
 
Old 03-15-2002, 10:54 AM   #7
Sixpax
Member
 
Registered: Mar 2002
Distribution: Mandrake 8.1
Posts: 386

Rep: Reputation: 30
What happens when you do the following:

1) su

2) su -

3) su -c "date"

4) su - -c "date"

5) su - -s /bin/ksh (if you have ksh installed)
 
Old 03-15-2002, 11:09 AM   #8
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 46
Well syslogd most likely gets run as root so if that is root's ulimit then that would only happen if one of your log files is larger then a 100MB. But most likely you rotate your log files anyways so they would never get that big.
I don't know what else it could be, do your log files maybe give some more detailed info?
 
Old 03-15-2002, 11:41 AM   #9
lhoff
Member
 
Registered: Jun 2001
Location: Chicago
Distribution: Mandrake 10.0 Official
Posts: 181

Original Poster
Rep: Reputation: 30
1) su
Gives me the password prompt. If I enter the password for root, it says "File size limit exceeded" and drops me back to the command prompt as regular user.

2) su -
Same as above.

3) su -c "date"
Same.

4) su - -c "date"
Same.

5) su - -s /bin/ksh (if you have ksh installed)
Same.


 
Old 03-15-2002, 02:10 PM   #10
isajera
Senior Member
 
Registered: Jun 2001
Location: San Antonio, TX
Distribution: distro? what's a distro?
Posts: 1,635

Rep: Reputation: 45
ok... i think i've found something. it has to do with the core file size...

i was reading about a old hacking method where a user would crash a program with root privledges, and use the core file output to gain root access. to prevent this, core file size is set to 0. i'm not sure about how secure it is to do this, but if you're not on a security critical system, try setting the core file size to 1024 or something, and see if that works.

i'll keep looking to see if i can find anything else.
 
Old 03-15-2002, 02:47 PM   #11
lhoff
Member
 
Registered: Jun 2001
Location: Chicago
Distribution: Mandrake 10.0 Official
Posts: 181

Original Poster
Rep: Reputation: 30
Okay, this is getting wierd:

I don't know how to change the core file size, so I did man ulimit to learn how and got

<standard input>:15: can't open `bash.1': No such file or directory

followed by a man page for BASH_BUILTINS (1)


Am I missing something critical here? And, since I can't get a man page, how do I change the core file size?

 
Old 03-15-2002, 03:30 PM   #12
Sixpax
Member
 
Registered: Mar 2002
Distribution: Mandrake 8.1
Posts: 386

Rep: Reputation: 30
Wow! It almost seems like a problem with the bash shell. I thought the "su - -s /bin/ksh" would check to see if a different shell would work, but now I'm wondering if it still goes through a bash shell before it invokes the korn shell. If it is bash, I don't understand why you can login from a console as root.

Do you have any problem su'ing to a generic user (who also uses bash)?
 
Old 03-15-2002, 04:24 PM   #13
lhoff
Member
 
Registered: Jun 2001
Location: Chicago
Distribution: Mandrake 10.0 Official
Posts: 181

Original Poster
Rep: Reputation: 30
Hhhhmmmmm....

I can su as another user. But, when I type exit, the following happens:

exit
Bus error

and I get back to the command prompt as myself. After that, su sameuserasbefore responds just like root:

File size limit exceeded

and doesn't let me become the superuser. At this rate, I'll rapidly confine myself to my own identity only.

Curiouser and curiouser...
 
Old 03-15-2002, 04:37 PM   #14
isajera
Senior Member
 
Registered: Jun 2001
Location: San Antonio, TX
Distribution: distro? what's a distro?
Posts: 1,635

Rep: Reputation: 45
well... i don't have a solution, but i definitely admire the problem...

i sent a few messages to our mods in the security forum, so they should take a look at this thread as soon as they pop in. this is a pretty curious problem, so i'll keep looking around. let us know if you discover anything else.
 
Old 03-15-2002, 04:51 PM   #15
lhoff
Member
 
Registered: Jun 2001
Location: Chicago
Distribution: Mandrake 10.0 Official
Posts: 181

Original Poster
Rep: Reputation: 30
My /etc/security/limits.conf contains the following:

#End of file
#prevent core dumps
* hard core 0

#limit size of any one of users' files to 100MB
* hard fsize 100000

Would either one of these be the culprit? (This file was touched by my Firewall configuration tool yesterday, so I'm following it as a lead...)
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Logging on as root from The Terminal bobbasic2002 Linux - General 3 03-16-2014 07:44 PM
terminal in the root window phil.d.g Linux - General 17 04-09-2005 05:00 AM
Log in terminal as Root ron126 Linux - Newbie 3 03-22-2005 11:45 AM
Can't open terminal as non-root Gsee Linux - Newbie 3 09-05-2004 07:38 AM
login as root through terminal! shycalais Linux - Newbie 3 10-17-2003 04:51 AM


All times are GMT -5. The time now is 08:53 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration