Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Change Sudo Timeout

  1. #1
    Join Date
    May 2007
    Location
    United Kingdom
    Beans
    2,803
    Distro
    Ubuntu Development Release

    [SOLVED] Change Sudo Timeout

    How do i make my sudo timout shorter?

    Another family member knows how to use linux and i dont want him sudo-ing my system after i have used sudo shortly before.

    Thanks
    Last edited by skymera; April 23rd, 2008 at 03:21 PM.

  2. #2
    Join Date
    Jun 2005
    Location
    Burlington, NC
    Beans
    394
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Change Sudo Timeout

    Quote Originally Posted by skymera View Post
    How do i make my sudo timout shorter?

    Another family member knows how to use linux and i dont want him sudo-ing my system after i have used sudo shortly before.

    Thanks
    Easy enough. Default is 15 minutes.
    http://ubuntuforums.org/showthread.p...697#post116697

  3. #3
    Join Date
    May 2007
    Location
    United Kingdom
    Beans
    2,803
    Distro
    Ubuntu Development Release

    Re: Change Sudo Timeout

    That default is wayyy to big.

    15 mins is a long time.
    Crazy, i had it at 2mins in 7.10

    *Thanks for the link bro.

  4. #4
    Join Date
    May 2007
    Location
    United Kingdom
    Beans
    2,803
    Distro
    Ubuntu Development Release

    Re: Change Sudo Timeout

    Ok i see now default line =S

    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.
    #
    
    Defaults        env_reset
    
    # Uncomment to allow members of group sudo to not need a password
    # %sudo ALL=NOPASSWD: ALL
    
    # Host alias specification
    
    # User alias specification
    
    # Cmnd alias specification
    
    # User privilege specification
    root    ALL=(ALL) ALL
    
    # Members of the admin group may gain root privileges
    %admin ALL=(ALL) ALL
    "/etc/sudoers.tmp" 23 lines, 470 characters
    Thats all i have

  5. #5
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: Change Sudo Timeout

    http://sudo.rtin.bz/sudo/man/sudoers.html

    timestamp_timeout

    Number of minutes that can elapse before sudo will ask for a passwd again. The default is 5. 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.
    Edit the file with visudo

    Code:
    sudo visudo
    To the defaults line, add :

    Code:
    timestamp_timeout=2
    Like this :

    Defaults env_reset,timestamp_timeout=2
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  6. #6
    Join Date
    May 2005
    Location
    US
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Change Sudo Timeout

    Create a separate user account for that family member?

  7. #7
    Join Date
    May 2007
    Location
    United Kingdom
    Beans
    2,803
    Distro
    Ubuntu Development Release

    Re: Change Sudo Timeout

    Thanks.

    I edited it with nano instead.
    Vim is useless.

    Thanks lads.

  8. #8
    Join Date
    Nov 2005
    Location
    NEK Vermont
    Beans
    Hidden!
    Distro
    Ubuntu UNR

    Re: Change Sudo Timeout

    er...sudoers file must be edited with vi, to avoid breakage. vi is far from useless. One must know a few basic commands in order to use the program, however.

  9. #9
    Join Date
    May 2007
    Location
    United Kingdom
    Beans
    2,803
    Distro
    Ubuntu Development Release

    Re: Change Sudo Timeout

    I followed this

    Code:
     sudo EDITOR=/usr/bin/nano visudo
    So it's fine.

  10. #10
    Join Date
    Jul 2007
    Location
    UK
    Beans
    17,059
    Distro
    Ubuntu Development Release

    Re: Change Sudo Timeout

    Quote Originally Posted by skymera View Post
    Thanks.

    I edited it with nano instead.
    Vim is useless.

    Thanks lads.
    You could just use

    sudo -k

    which would kill the timestamp.

Page 1 of 2 12 LastLast

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
  •