# sudo not working when user defined as part of a group

**URL:** <https://forum.ansible.com/t/sudo-not-working-when-user-defined-as-part-of-a-group/18242>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [May 16, 2015, 12:13am UTC](https://forum.ansible.com/t/sudo-not-working-when-user-defined-as-part-of-a-group/18242 "2015-05-16T00:13:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yves\_Dorfsman](https://avatars.discourse-cdn.com/v4/letter/y/9de0a6/32.png) [@Yves\_Dorfsman](https://forum.ansible.com/u/Yves_Dorfsman)\
**Post date:** [May 16, 2015, 12:13am UTC](https://forum.ansible.com/t/sudo-not-working-when-user-defined-as-part-of-a-group/18242/1 "2015-05-16T00:13:15Z")

</div>

Ubuntu 14.04  
Ansible 1.9.1

When I explicitly define a user in the sudoers file, ansible works as expected.

But, when I remove that user from the sudoers file, and add it to the UNIX  
group sudo (with `%sudo ALL=(ALL:ALL) ALL` in the sudoers file), the user on  
the host is still able to sudo, but the same ansible playbook is now returning  
(assuming username yves):

&nbsp;&nbsp;&nbsp;&nbsp;yves is not in the sudoers file. This incident will be reported.

Any idea what's going on?

---

<div class="post-metadata">

**Author:** ![Yves\_Dorfsman](https://avatars.discourse-cdn.com/v4/letter/y/9de0a6/32.png) [@Yves\_Dorfsman](https://forum.ansible.com/u/Yves_Dorfsman)\
**Post date:** [May 16, 2015, 6:20pm UTC](https://forum.ansible.com/t/sudo-not-working-when-user-defined-as-part-of-a-group/18242/2 "2015-05-16T18:20:22Z")

</div>

Works now, I had not checked the instructions and had not realised there were  
git submodules. I have run `git submodule update --init --recursive` and it  
solved all my issues.
