# Ansible --become not working when “sudo with NOPASSWD” is not activated on remote machine - MODULE FAILURE

**URL:** <https://forum.ansible.com/t/ansible-become-not-working-when-sudo-with-nopasswd-is-not-activated-on-remote-machine-module-failure/34447>\
**Category:** Ansible Project\
**Created:** [January 15, 2021, 8:55am UTC](https://forum.ansible.com/t/ansible-become-not-working-when-sudo-with-nopasswd-is-not-activated-on-remote-machine-module-failure/34447 "2021-01-15T08:55:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohit\_Dhingra](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@Mohit\_Dhingra](https://forum.ansible.com/u/Mohit_Dhingra)\
**Post date:** [January 15, 2021, 8:55am UTC](https://forum.ansible.com/t/ansible-become-not-working-when-sudo-with-nopasswd-is-not-activated-on-remote-machine-module-failure/34447/1 "2021-01-15T08:55:03Z")

</div>

Hi,

In remote server, normal user is having sudo access but NOPASSWD not activated. sudo su - command ask for user password. I am trying to run a command using Ansible as providing sudo password but its not working getting “MODULE FAILURE\nSee stdout/stderr for the exact error” error. Please check below logs.

Inventory file

---

<div class="post-metadata">

**Author:** ![jean-yves](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jean-yves](https://forum.ansible.com/u/jean-yves)\
**Post date:** [January 15, 2021, 9:06am UTC](https://forum.ansible.com/t/ansible-become-not-working-when-sudo-with-nopasswd-is-not-activated-on-remote-machine-module-failure/34447/2 "2021-01-15T09:06:42Z")

</div>

Hi,

Sounds strange indeed.

Please try to connect to remote server with ssh with remote\_user, and do a “sudo ls /” for example to see if the problem occurs

You did authorize all commands for sudo and not only “sudo su -”? (something like this below)

%sudo ALL=(ALL:ALL) ALL

Regards,

JYL
