LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-03-2007, 02:33 PM   #1
otacon 14112
Member
 
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46

Rep: Reputation: 15
My bash window keeps closing...


Hi, when I leave and come back to my computer, I findthat bash has closed. The first few times I thought I just closed it, but today when I went to my internship, I purposely left it open, and the top window, and when I came back, guess what, it was closed.

What in the world is going on here? Is it a hacker, or is there something wrong with bash? Only bash closes, no other windows close. This is really starting to concern me.

GNU bash, version 3.1.17(2)-release (i586-mandriva-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

Thanks in advance,
diode
 
Old 04-03-2007, 03:00 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Your TMOUT environment variable is probably set to a non-zero value. To check,

echo $TMOUT

From the bash man page:

Quote:
TMOUT If set to a value greater than zero, TMOUT is treated as the
default timeout for the read builtin. The select command termi-
nates if input does not arrive after TMOUT seconds when input is
coming from a terminal. In an interactive shell, the value is
interpreted as the number of seconds to wait for input after
issuing the primary prompt. Bash terminates after waiting for
that number of seconds if input does not arrive.
It is probably set in your ~/.bashrc or ~/.bash_profile or /etc/profile.
 
Old 04-03-2007, 03:07 PM   #3
otacon 14112
Member
 
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46

Original Poster
Rep: Reputation: 15
Hi, thanks for your input. I checked all three of those files, and it wasn't in any of them, although I did echo $TMOUT, and it said 3600.

How do I get this to be 0?

Thanks again,
otacon
 
Old 04-03-2007, 03:31 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Well, it's probably being set by something called from one of those files. What you can try is setting it yourself in your ~/.bashrc

export TMOUT=0
 
Old 04-03-2007, 09:30 PM   #5
otacon 14112
Member
 
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46

Original Poster
Rep: Reputation: 15
Ok I tried that in all those files, and sourced them, and for each one, it gave an error message saying bash: TMOUT: readonly variable. I tried this as my regular user and as root.

I manned bash and found mention of a select command buried in there, do you think that's what it is? Though I searched all three of those files for that also, and found nothing. Will it be necessary to pass a parameter to bash on the command line just to have a window that doesn't close? Is this even possible? That sounds so dirty to do it that way, I hope there is a way to correct this.

My linux installation is on a 'high' security level. Previously, it was on a 'standard' security level. Would that play a role in this?

Thanks,
otacon
 
Old 04-03-2007, 10:18 PM   #6
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
OK, from the Mandriva documentation, you need to edit '/etc/security/msec/security.conf' and add/set 'set_shell_timeout(0)'.
 
Old 04-04-2007, 11:05 PM   #7
otacon 14112
Member
 
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46

Original Poster
Rep: Reputation: 15
Ok thanks, I added the line to the file. I restarted. But $TMOUT is still = to 3600. It seems like the line wasn't executed.

I went into Mandriva Control Center and didn't see anything about this under security. I'm stuck on what to do now.

Thanks alot,
otacon
 
Old 04-04-2007, 11:42 PM   #8
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Try:

grep -i -r "shell_timeout" /etc/security/*

See if it's set anywhere else.
 
Old 04-05-2007, 05:45 PM   #9
otacon 14112
Member
 
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46

Original Poster
Rep: Reputation: 15
Aha, I had an apostrophe ' before set. It's fixed now. Do I have to log out, or restart or is there a way to run this file to set the new environment variable value? Also, after seeing the results of what you just suggested, this is the only file that has this line in it. I went to the F2 console and logged in as a different user, and did echo $TMOUT, and it was still set to 3600.

Thanks alot,
otacon
 
Old 04-05-2007, 06:08 PM   #10
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
According to the Mandriva documentation, you should just need to run (as root)

msec

The changes will take effect after that (or on the next reboot).
 
Old 04-05-2007, 09:21 PM   #11
otacon 14112
Member
 
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46

Original Poster
Rep: Reputation: 15
I restarted, and it still is 3600...
 
Old 04-05-2007, 09:22 PM   #12
otacon 14112
Member
 
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46

Original Poster
Rep: Reputation: 15
Forgot to mention that I ran it as root, and when I ran it, it executed good, because it didn't display any messages after it ran.

otacon
 
Old 04-05-2007, 09:28 PM   #13
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
At this point, I suggest you open a bug report with Mandriva.
 
  


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
Javasript - closing a window djgerbavore Programming 1 05-06-2005 01:01 PM
closing a frozen window!? ungua Linux - Software 6 11-14-2004 01:38 PM
Close window error when not closing firehawk573 Programming 0 03-22-2004 03:05 PM
How to re-open kppp after closing window carjumble Linux - Newbie 2 12-24-2003 08:20 PM
X-Window Freeze when closing X Session smitchel Linux - Software 3 11-12-2001 11:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:43 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