Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-03-2007, 02:33 PM
|
#1
|
Member
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46
Rep:
|
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
|
|
|
04-03-2007, 03:00 PM
|
#2
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
|
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.
|
|
|
04-03-2007, 03:07 PM
|
#3
|
Member
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46
Original Poster
Rep:
|
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
|
|
|
04-03-2007, 03:31 PM
|
#4
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
|
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
|
|
|
04-03-2007, 09:30 PM
|
#5
|
Member
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46
Original Poster
Rep:
|
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
|
|
|
04-03-2007, 10:18 PM
|
#6
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
|
OK, from the Mandriva documentation, you need to edit '/etc/security/msec/security.conf' and add/set 'set_shell_timeout(0)'.
|
|
|
04-04-2007, 11:05 PM
|
#7
|
Member
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46
Original Poster
Rep:
|
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
|
|
|
04-04-2007, 11:42 PM
|
#8
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
|
Try:
grep -i -r "shell_timeout" /etc/security/*
See if it's set anywhere else.
|
|
|
04-05-2007, 05:45 PM
|
#9
|
Member
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46
Original Poster
Rep:
|
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
|
|
|
04-05-2007, 06:08 PM
|
#10
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
|
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).
|
|
|
04-05-2007, 09:21 PM
|
#11
|
Member
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46
Original Poster
Rep:
|
I restarted, and it still is 3600...
|
|
|
04-05-2007, 09:22 PM
|
#12
|
Member
Registered: Apr 2004
Location: /
Distribution: ubuntu (gutsy)
Posts: 46
Original Poster
Rep:
|
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
|
|
|
04-05-2007, 09:28 PM
|
#13
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
|
At this point, I suggest you open a bug report with Mandriva.
|
|
|
All times are GMT -5. The time now is 02:57 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|