↝ OWC / MacSales.com... ↜
↝ diglloyd Deal Finder... ↜
Buy other stuff at Amazon.com...
High capacity, high-performance fault-tolerant storage for photography and video.
Non-RAID or RAID-0/1/4/5/10.
Capacities up to 84 Terabytes!
Extending the 'sudo' Timeout
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.
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
Up to 128GB for 2019 iMac 5K!
Up to 64GB for 2015/2017 iMac 5K
Save nearly 50% over Apple pricing
$699 SAVE $450 = 39.0% Apple 12.9" iPad Pro (Mid 2017, 512GB, Wi-Fi Only, Gold) in Electronics: iPads and Tablets
$5499 SAVE $800 = 12.0% Apple 15.4" MacBook Pro with Touch Bar (Mid 2018, Space Gray) in Computers: Apple Macs
$2549 SAVE $300 = 10.0% Apple 15.4" MacBook Pro with Touch Bar (Mid 2018, Space Gray) in Computers: Apple Macs
$18 SAVE $32 = 64.0% Energizer Multi-Fit LCD Timer Remote Shutter Release in Accessories: Photo Accessories
$7995 SAVE $3720 = 31.0% Leica Leica SL (Typ 601) Mirrorless with 50mm Lens Bundle in Cameras: Mirrorless
$170 SAVE $130 = 43.0% Ooma Home Security Starter Kit with Butterfleye Camera in All Other Categories