Two Wrongs

(don't make a right)

Passwordless sudo

by ~kqr

This is trivially findable information, and mostly here just for my own sake.

In my effort to reduce my password usage, I've started allowing myself to run some commands through sudo without typing in my password. These are commands that I run frequently enough, and that seem innocent enough, to warrant not asking for my password. The list is short at the moment but will grow with time.

Cmnd_Alias APT = /usr/bin/apt-get
Cmnd_Alias FIREWALL = /usr/sbin/iptables -vL, /usr/sbin/iptables-restore
Cmnd_Alias NETWORK = /usr/sbin/ifconfig ""
Cmnd_Alias LOG = /usr/sbin/journalctl


# only for the laptop
ALL     ALL=NOPASSWD: /bin/systemctl suspend

If you enjoyed this article, you might like others tagged with