Skip to content

Sudo comands with no password

DISCLAIMER This is extremely unsafe, as you might imagine, so I can't advise you to do it.

However the magic of Linux is that you can do everything including shooting yourself in the foot so here it is.

sudo vim /etc/sudoers

and add

user_name ALL=(root) NOPASSWD:/path/to/command1 /path/to/command2

Commands are usually in /usr/bin, /usr/sbin, /bin, /sbin.