0

I have a PADD setup on my Raspberry Pi 3 running on Ubuntu Server 20.04.

I can successfully bypassed sudo password authentication by adding:

pihole_display ALL=(ALL) NOPASSWD:ALL

But when I try to limit to /usr/local/bin/pihole only, it doesn't work.

I looked at the file itself to see if I need to add another executable to filter out, but I didn't notice anything else.

Question is, is it possible to simply use padd.sh file and any commands in that file won't ask for sudo password?

YamiYukiSenpai
  • 691
  • 10
  • 28
  • 3
    Run the script with `sudo` and remove it from the script. – Pilot6 Jan 17 '21 at 14:58
  • 1
    Does this answer your question? [How do I sudo a command in a script without being asked for a password?](https://askubuntu.com/questions/155791/how-do-i-sudo-a-command-in-a-script-without-being-asked-for-a-password). – schrodingerscatcuriosity Jan 17 '21 at 15:01
  • Adding `sudo` worked. I'll just add that as the answer to my own question. Thanks! – YamiYukiSenpai Jan 18 '21 at 20:33
  • 3
    Does this answer your question? [How to enter password only once in a bash script needing sudo](https://askubuntu.com/questions/711580/how-to-enter-password-only-once-in-a-bash-script-needing-sudo) – muru Jan 19 '21 at 13:17

1 Answers1

0

This was answered in the comments, but I'll copy it here for visibility

Run the script with sudo. So simple, can't believe I overlooked it.

YamiYukiSenpai
  • 691
  • 10
  • 28