# Stuck with Exec and sudo

**URL:** <https://discourse.nodered.org/t/stuck-with-exec-and-sudo/8303>\
**Category:** General\
**Created:** [23 February 2019 16:49 UTC](https://discourse.nodered.org/t/stuck-with-exec-and-sudo/8303 "2019-02-23T16:49:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gambituk](https://avatars.discourse-cdn.com/v4/letter/g/e99b99/32.png) [@gambituk](https://discourse.nodered.org/u/gambituk)\
**Post date:** [23 February 2019 16:49 UTC](https://discourse.nodered.org/t/stuck-with-exec-and-sudo/8303/1 "2019-02-23T16:49:38Z")

</div>

Hello, i'm running node-red on an orange-pi, it is running armbian with the diet-pi scripts ontop.

I've slowly built up flows that i am happy with, and i started trying to use some exec nodes.

For some nodes it is ok, but for anything using sudo, i get the message We trust you have received the usual lecture from the local System↵Administrator. It usually boils down to these three things:↵↵ #1) Respect the privacy of others.↵ #2) Think before you type.↵ #3) With great power comes great responsibility.↵↵sudo: no tty present and no askpass program specified↵"

I've tried to add the user nodered to visudo, but it doesn't seem to have helped.

Please can someone point me gently in the right direction?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [23 February 2019 17:51 UTC](https://discourse.nodered.org/t/stuck-with-exec-and-sudo/8303/2 "2019-02-23T17:51:33Z")

</div>

You need the following - I have it in `/etc/sudoers.d/010_pi-nopasswd`:

```
pi ALL=(ALL) NOPASSWD: ALL

```

You will need to change `pi` to whatever your device is using as a user. You should test it from the command line first.

Obviously it is more secure to put specific commands in there rather than using `ALL`.

---

<div class="post-metadata">

**Author:** ![gambituk](https://avatars.discourse-cdn.com/v4/letter/g/e99b99/32.png) [@gambituk](https://discourse.nodered.org/u/gambituk)\
**Post date:** [23 February 2019 18:12 UTC](https://discourse.nodered.org/t/stuck-with-exec-and-sudo/8303/3 "2019-02-23T18:12:09Z")

</div>

Thanks so much for the pointer, that's done it. perfect, thanks!!!!!
