Thank you for purchasing through links and ads on this site.
OWC / MacSales.com...
diglloyd Deal Finder...
Buy other stuff at Amazon.com...
Upgrade the memory of your 2018 Mac mini up to 64GB
Handpicked deals...
$30 $15
SAVE $15

$2998 $2498
SAVE $500

$1199 $920
SAVE $279

$1999 $1599
SAVE $400

$2799 $2399
SAVE $400

$89 $59
SAVE $30

$400 $280
SAVE $120

$1798 $1598
SAVE $200

$3297 $2797
SAVE $500

$3397 $2797
SAVE $600

$150 $90
SAVE $60

$1398 $898
SAVE $500

$3698 $2998
SAVE $700

$1799 $1329
SAVE $470

$1999 $1199
SAVE $800

$2299 $1599
SAVE $700

$2399 $2049
SAVE $350

$2799 $1899
SAVE $900

$997 $897
SAVE $100

$2099 $1699
SAVE $400

$1999 $1369
SAVE $630

$1349 $949
SAVE $400

$4499 $3999
SAVE $500

$329 $329
SAVE $0

$1499 $1029
SAVE $470

$1499 $1289
SAVE $210

$2199 $1999
SAVE $200

$3399 $2199
SAVE $1200

Extending the 'sudo' Timeout

Last updated 2013-07-12 - Send Feedback
Related: how-to, optimization

This is a technical article. It deliberately does not explain too much.

In Terminal, the 'sudo' command can be a hard requirement for getting things done in some cases. But timeout can be an issue; it’s inconvenient to enter a password frequently.

On my daily machine at home, I am not concerned about a stranger walking up and having access to the computer. Since the timeout for 'sudo' is too short, so I like to increase it to 30 minutes.

env_reset,timestamp_timeout=2

See also

sudo -k // requires password every time; does not create timestamp file
sudo -K // forces password re-entry (deletes timestamp file)

Example sudoers file (/private/etc/sudoers)

Shown below is the sudoers file with a timeout of 30 minutes.

Use 'sudo visudoers' to edit, or with care, plain text editor such as TextWrangler.

# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults specification
Defaults	env_reset,timestamp_timeout=30
Defaults	env_keep += "BLOCKSIZE"
Defaults	env_keep += "COLORFGBG COLORTERM"
Defaults	env_keep += "__CF_USER_TEXT_ENCODING"
Defaults	env_keep += "CHARSET LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE"
Defaults	env_keep += "LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME"
Defaults	env_keep += "LINES COLUMNS"
Defaults	env_keep += "LSCOLORS"
Defaults	env_keep += "SSH_AUTH_SOCK"
Defaults	env_keep += "TZ"
Defaults	env_keep += "DISPLAY XAUTHORIZATION XAUTHORITY"
Defaults	env_keep += "EDITOR VISUAL"
# Runas alias specification
# User privilege specification
root	ALL=(ALL) ALL
%admin	ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel	ALL=(ALL) ALL
# Same thing without a password
# %wheel	ALL=(ALL) NOPASSWD: ALL
# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now
%admin ALL= NOPASSWD: /sbin/kextload, /sbin/kextunload
%users ALL= NOPASSWD: /sbin/kextload, /sbin/kextunload
ALL ALL= NOPASSWD: /sbin/kextload, /sbin/kextunload
OWC Thunderbolt 3 Dock
Ideal for any Mac with Thunderbolt 3


Dual Thunderbolt 3 ports
USB 3 • USB-C
Gigabit Ethernet
5K and 4K display support plus Mini Display Port
Analog sound in/out and Optical sound out

Works on any Mac with Thunderbolt 3
OWC
USB-C Travel Dock

Fast charging with up to 100W!

HDMI, SD card reader,
USB-C port, 2 USB Type-A ports
Built-in cable self-stores neatly.
See also OWC 14-port Thunderbolt 3 Dock"
OWC Thunderblade Thunderbolt 3 SSD
Gen 2!

Blazing fast, 1TB, 2TB, 4TB, 8TB.

Lloyd’s all-time favorite SSD!

√ No more slow and noisy hard drives!
View all handpicked deals...

Pelican 3rd-Generation 1910B LED Flashlight (Black)
$30 $15
SAVE $15

diglloyd.com | Terms of Use | PRIVACY POLICY
Contact | About Lloyd Chambers | Consulting | Photo Tours
Mailing Lists | RSS Feeds | Twitter
Copyright © 2019 diglloyd Inc, all rights reserved.
Display info: __RETINA_INFO_STATUS__