Sudoers hacking

If you are constantly have to type your password in due to a long installation (like a few hours), then here’s the trick. Add the following line with
 
““
sudo visudo


  You should use visudo so that it checks your sudoers file and makes it work, but to exempt a user from ever having to type their password (a big hole unless you are running on VMware Fusion so the host operating system is providing security, you want to create a new file in /etc/sudoers.d so you don't pollute the base /etc/sudoer file. All files in the directory are included in the main sudoers file  

what-ever-user-name-you-want-to-exempt ALL=(ALL) NOPASSWD:ALL


  If you want to be a little more safe just crank up the time between asking for passwords say to 5 hours (5 x 60 = 360). Note that the word Default must have initial caps:

Defaults timestamp_timeout=360
“`
 
 

I’m Rich & Co.

Welcome to Tongfamily, our cozy corner of the internet dedicated to all things technology and interesting. Here, we invite you to join us on a journey of tips, tricks, and traps. Let’s get geeky!

Let’s connect

Recent posts

Loading Mastodon feed…