Results 1 to 5 of 5

Thread: Sudo timeout driving me crazy. How can I extend the timeout?

  1. #1
    Join Date
    Mar 2010
    Beans
    52

    Sudo timeout driving me crazy. How can I extend the timeout?

    I have read that after entering sudo followed by a command, and entering my password, the terminal should remember my password for 15 min so that I don't have to reenter my password for each command.

    However, my sudo timeout seems to be zero. It makes me reenter the word sudo in front of every command line and reenter my password each time too.

    How can I edit the sudoers file to set the time out to 15 minutes?

  2. #2
    Join Date
    Apr 2006
    Location
    Dallas, TX
    Beans
    1,359
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Sudo timeout driving me crazy. How can I extend the timeout?

    I haven't changed it myself, but it's in the wiki:

    https://help.ubuntu.com/community/RootSudoTimeout

  3. #3
    Join Date
    May 2010
    Location
    Tewkesbury uk
    Beans
    7,625
    Distro
    Ubuntu Development Release

    Re: Sudo timeout driving me crazy. How can I extend the timeout?

    Hi

    Quote Originally Posted by charleswb View Post
    I have read that after entering sudo followed by a command, and entering my password, the terminal should remember my password for 15 min so that I don't have to reenter my password for each command.
    From
    Code:
    man sudoers
    .
    Once a user has been authenticated, a time stamp is updated and the user may then use sudo without a
    password for a short period of time (15 minutes unless overridden by the timeout option.
    As you state, the default timeout is 15 mins.
    However, my sudo timeout seems to be zero. It makes me reenter the word sudo in front of every command line and reenter my password each time too.
    You will always have to enter sudo before a command if you want to run that command with elevated privileges.

    You should not have to enter your password each time though.


    How can I edit the sudoers file to set the time out to 15 minutes?
    First thing i would check would be your sudoers file.

    Open a terminal and type

    Code:
    sudo visudo
    Look for a line containing the word
    Code:
    Defaults
    and see if it has the text

    Code:
    timestamp_timeout
    . If it does then remove it.

    IE. If you see a line that looks something like this

    Code:
    Defaults        env_reset, timestamp_timeout=0
    Change it to this.

    Code:
    Defaults        env_reset
    i.e remove the reference to timestamp_timeout=X from the file.

    Be very careful when editing the file (although using visudo should perform checks for you). If in doubt post the contents of the file here so we can look before modify it.

    After that i would check the timestamps directories below the directory

    Code:
    /var/lib/sudo/
    EDIT: Beaten to it. That will teach me for writing a novel

    Kind regards
    Last edited by matt_symes; May 24th, 2012 at 02:26 AM.
    Join us on irc at #ubuntuforums. For web chat see here

    If you believe everything you read, you better not read. ~ Japanese Proverb

    Do not read newspapers on an empty stomach ~ Russian Proverb ~ BrunoLotse

  4. #4
    Join Date
    Mar 2010
    Beans
    52

    Re: Sudo timeout driving me crazy. How can I extend the timeout?

    Thanks, I haven't yet tried the above, but that should cover it.

    P.S. - I'm not sure if a tech who worked on my computer in the past changed my timeout, or if I just didn't understand. I will work through the above advice step-by-step and figure it out.

    Thanks again.

  5. #5
    Join Date
    Aug 2009
    Location
    United States
    Beans
    4,459
    Distro
    Ubuntu Development Release

    Re: Sudo timeout driving me crazy. How can I extend the timeout?

    Be careful charleswb everyone has messed up this file at one time or another. Follow your directions closely. I use nano as a editor each has there preference.

    https://help.ubuntu.com/community/Sudoers
    sign before letters at bottom means ctrl.
    click on screenshot below. Just in case http://www.psychocats.net/ubuntu/fixsudo
    Attached Images Attached Images
    Last edited by garvinrick4; May 29th, 2012 at 11:01 PM.
    Remember hence where you come and pass it down.
    Ubuntu Forums member #899097 and Ubuntu Member:
    http://www.ubuntupocketguide.com/index_main.html
    Main Page -

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •