LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 09-25-2010, 12:30 PM   #1
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
How in flinderation do you set teh terminal time out?


There used to be a time out period, 15 minutes I think, and now when I am chrooting 6 or 7 systems I need to give a password for every one of them.

This gets old.

I am sure there is a way to do this.

Sudo visudo does not do it. It will Work until I reboot. When I run it again, the setting is the sames as I set it the last session. I need to redo it, exit and then put it back to where I want it again.

I figure I am doing it in the wrong place but can't figure it out and it is really getting on my thungas.
 
Old 09-25-2010, 01:27 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
What the heck are you referring to by "terminal time out" ? "it" "it" "it" .. what time out are you talking about? The amount of idle time after which sudo will re-ask you for your password? The amount of idle time after which the shell will kick you out?
 
Old 09-25-2010, 02:30 PM   #3
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Original Poster
Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Quote:
Originally Posted by AlucardZero View Post
What the heck are you referring to by "terminal time out" ? "it" "it" "it" .. what time out are you talking about? The amount of idle time after which sudo will re-ask you for your password? The amount of idle time after which the shell will kick you out?
That is an excelent question. Blame it on senility.

The password time out is what I really want to set.
 
Old 09-25-2010, 04:21 PM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Ok, so that's set by "Defaults timestamp_timeout=-1" in your sudoers file. Are you saying that you add that but it goes away on reboot?
 
Old 09-25-2010, 05:28 PM   #5
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Original Poster
Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
That could be the problem. Forget where I got the directions but it was some Ubuntu blog. Those have a history, in my mind anyway, of making things up as they go a long. I know that Grub2 would bother people a lot less if the ywould not follow the general blog directions.

I did follow them anyway, wondering about the resulting entry;
Code:
Defaults        env_reset    ,  timestamp_timeout=15
as it does have the env_reset instruction in there.

Having a dislike of crippling my system I was unwilling to remove that.

The behavior I get is that if I remove the timestamp part, save, reopen and put it back it works until reboot. What a shock.

I will give it a whack with your string. Might just work a lot better.

Thanks. I will post back tomorrow after I get back to this drive and it still works (or not from some other silly thing I have done).
 
Old 09-25-2010, 05:40 PM   #6
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Original Poster
Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
Well, guess I will not wait til tomorrow. It will not take that entry, with or with out the , that is in there now. This is the entire file;
Code:
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Default  ,   timestamp_timeout=15

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL
tom     ALL=(ALL) ALL

# Allow members of group sudo to execute any command
# (Note that later entries override this, so you might need to move
# it further down)
%sudo ALL=(ALL) ALL
#
# includedir /etc/sudoers.d
and the resulting output;
Code:
>>> /etc/sudoers: syntax error near line 7 <<<
What now?
It is very happy to have the line back to;
Code:
Defaults        env_reset    ,  timestamp_timeout=15
 
Old 09-25-2010, 06:45 PM   #7
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
You would have to remove the comma, too. But don't remove env_reset.

Use:
Code:
Defaults        env_reset 
Defaults timestamp_timeout=-1
BTW, from man sudoers:
Code:
       timestamp_timeout
                       Number of minutes that can elapse before sudo will ask for a passwd again.
                       The default is 15.  Set this to 0 to always prompt for a password.  If set
                       to a value less than 0 the user’s timestamp will never expire.  This can
                       be used to allow users to create or delete their own timestamps via sudo
                       -v and sudo -k respectively.
Also, a blog: http://www.wains.be/index.php/2008/0...sword-timeout/
 
1 members found this post helpful.
Old 09-25-2010, 06:53 PM   #8
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Original Poster
Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
OK, OK, so I am too smart to follow directions.

Actually to chicken to follow directions.

Over on an Ubuntu test OS and just entered things as you laid it out. Seems to work fine.

Just don't want to screw my Debian install as it is being set up to be my secure business OS. The one I am using now will be the one I play with before doing anything to the secure one.

With the "=-1" what is the timeout set at or does it just not expire?
 
Old 09-25-2010, 07:18 PM   #9
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
If set to a value less than 0 the user’s timestamp will never expire.
 
Old 09-25-2010, 09:40 PM   #10
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Original Poster
Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
OK, thanks again.

I will play with it and see what I can do that will make it work the way I want.
 
  


Reply



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
how to set and sync system time with time server?? servnov Linux - Newbie 6 12-03-2013 07:55 PM
Time skew of 580 min when I set my time zone in Gentoo scooter2 Linux - Newbie 1 03-05-2009 10:27 AM
Where does RH8 daily set system time to hardware clock time smartnorman Red Hat 1 05-24-2006 02:42 PM
Cannot set time/date to other time zone than UTC (Kubuntu) jamangold Ubuntu 1 12-23-2005 05:42 PM
Doub about `net time set` and daylight saving time Thakowbbery Linux - Software 0 10-17-2005 05:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 05:49 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
Open Source Consulting | Domain Registration