# Missing sudo password

**URL:** <https://forum.ansible.com/t/missing-sudo-password/16539>\
**Category:** Ansible Project\
**Created:** [October 17, 2014, 4:57pm UTC](https://forum.ansible.com/t/missing-sudo-password/16539 "2014-10-17T16:57:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alain\_Kreienbuhl](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@Alain\_Kreienbuhl](https://forum.ansible.com/u/Alain_Kreienbuhl)\
**Post date:** [October 17, 2014, 4:57pm UTC](https://forum.ansible.com/t/missing-sudo-password/16539/1 "2014-10-17T16:57:38Z")

</div>

Hello,

I’m very puzzled

I run usually all my playbooks with a user (user\_sys) having full no passwd sudo privileges .  
Now for the deployment of app I wanted to use the a user (user\_adm) having sudo privileges only to what it is actually doing .

Since the inventory file is setting ansible\_ssh\_user to the user\_sys, in the deployment playbook I’v specified ansible\_ssh\_user: user\_adm

Problem arise very early on with the fact gathering where i’m getting a “Missing sudo password” error message. After disabling that, I’m getting a more "“Missing sudo password” on a shell command that can be run by user\_adm.

But it looks like ansible is doing sudo -u root /bin/sh -c \<ansible\_shell\>. Of course user\_adm can’t sudo run a shell as root. I just want to sudo the actual commands …

I’m I stuck here ? Or missing something big ?

Thanks for you help

Alain

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 20, 2014, 9:07pm UTC](https://forum.ansible.com/t/missing-sudo-password/16539/2 "2014-10-20T21:07:53Z")

</div>

Please read the explanation about sudo in the first “note” section under

[http://docs.ansible.com/intro\_adhoc.html#id8](http://docs.ansible.com/intro_adhoc.html#id8)

---

<div class="post-metadata">

**Author:** ![Alain\_Kreienbuhl](https://avatars.discourse-cdn.com/v4/letter/a/e495f1/32.png) [@Alain\_Kreienbuhl](https://forum.ansible.com/u/Alain_Kreienbuhl)\
**Post date:** [October 21, 2014, 7:35am UTC](https://forum.ansible.com/t/missing-sudo-password/16539/3 "2014-10-21T07:35:05Z")

</div>

Okay, use tower. I’ll check it out.

Thanks for your answer and congrats for the 1st Ansible Fest.

Cheers

Alain

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 22, 2014, 3:46am UTC](https://forum.ansible.com/t/missing-sudo-password/16539/4 "2014-10-22T03:46:53Z")

</div>

Nah, it wasn’t a “use tower” note so much as a “individual commands can’t be restricted with sudo” note.

Ansible just doesn’t do that.

Restricting sudo to not be able to run the “command” module would be super limiting anyway.
