Use Sudo Without Password Prompt in Scripts
View on Twitter
💡 Using a non-root user and requiring a password for sudo is a security best practice. However, in scripts you often need to use sudo without a password.
👉🏼 Run:
➡️ sudo visudo
And add this line to "/etc/sudoers" to disable password req:
"youruser ALL=(ALL:ALL) NOPASSWD: ALL"