# user module doesn't work properly

**URL:** <https://forum.ansible.com/t/user-module-doesnt-work-properly/19567>\
**Category:** Ansible Project\
**Tags:** rhel\
**Created:** [October 20, 2015, 7:07pm UTC](https://forum.ansible.com/t/user-module-doesnt-work-properly/19567 "2015-10-20T19:07:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Koji\_Tanaka](https://avatars.discourse-cdn.com/v4/letter/k/a698b9/32.png) [@Koji\_Tanaka](https://forum.ansible.com/u/Koji_Tanaka)\
**Post date:** [October 20, 2015, 7:07pm UTC](https://forum.ansible.com/t/user-module-doesnt-work-properly/19567/1 "2015-10-20T19:07:05Z")

</div>

Hello Ansible Community,

I have a task described below, and it works fine if the user account has been managed by Ansible since the moment of the user account creation. However, this task always ends with “changed” status when I try to manage an existing user account on an existing server. Has anyone seen the same issue? Or could it be something local to my server? The OS is RHEL 6.7, and the Ansible version is 1.9.4.

```auto
- name: create user myuser
  user:
    name: myuser
    comment: my test user
    home: /home/myuser
    uid: 12345
    groups: users
    password: encrypted_password
    update_password: on_create

```

Thank you,  
Koji

---

<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:** [October 21, 2015, 9:49am UTC](https://forum.ansible.com/t/user-module-doesnt-work-properly/19567/2 "2015-10-21T09:49:13Z")

</div>

Hi,

Why did you use groups when you have only one group ?  
I think you should use "group" instead of "groups"

This is this issue  
[https://github.com/ansible/ansible-modules-core/issues/1118](https://github.com/ansible/ansible-modules-core/issues/1118)  
A part of the problem is when you put your main group in the groups (with a s) list

Regards,

---

<div class="post-metadata">

**Author:** ![Koji\_Tanaka](https://avatars.discourse-cdn.com/v4/letter/k/a698b9/32.png) [@Koji\_Tanaka](https://forum.ansible.com/u/Koji_Tanaka)\
**Post date:** [October 21, 2015, 3:03pm UTC](https://forum.ansible.com/t/user-module-doesnt-work-properly/19567/3 "2015-10-21T15:03:52Z")

</div>

Thank you so much, Jean-Yves. That's exactly the issue I had. I used  
"groups" because the first user account I tried to maintain had  
multiple groups to belong to, and I ignorantly copied and pasted it  
without caring much about the "s".

Now I know what's behind. Thanks so much again!

Bests,  
Koji
