# Sudo syntax help, please.

**URL:** <https://forum.ansible.com/t/sudo-syntax-help-please/16233>\
**Category:** Ansible Project\
**Created:** [September 15, 2014, 7:29pm UTC](https://forum.ansible.com/t/sudo-syntax-help-please/16233 "2014-09-15T19:29:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tiglath](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@Tiglath](https://forum.ansible.com/u/Tiglath)\
**Post date:** [September 15, 2014, 7:29pm UTC](https://forum.ansible.com/t/sudo-syntax-help-please/16233/1 "2014-09-15T19:29:22Z")

</div>

[User@server](mailto:User@server) ~/ ansible server2 -i group.ini -m shell -a “cd /tmp/tmp; /usr/bin/tar xf …/data.tar --same-permissions --same-owner” --sudo -K

sudo password:

sslmioq | FAILED =\> ssh connection closed waiting for sudo or su password prompt

Why?

Thanks

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [September 15, 2014, 8:23pm UTC](https://forum.ansible.com/t/sudo-syntax-help-please/16233/2 "2014-09-15T20:23:36Z")

</div>

Hi, does that user have NOPASSWD set in /etc/sudoers, or is there any other relevant sudo configuration you’ve setup? This may also be caused by a PAM lookup to a centralized authentication system (ie. LDAP or Active Directory) which is taking a long amount of time to return.

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [September 15, 2014, 8:36pm UTC](https://forum.ansible.com/t/sudo-syntax-help-please/16233/3 "2014-09-15T20:36:14Z")

</div>

ansible with basically the same command line arguments works here. Perhaps it’s a problem with how sudo is setup on the remote box.

If you add -vvv to your ansible command line it will output some more information about what it’s executing on the remote machine that might help figure out what’s going on.

-Toshio
