# What privilege required for an ansible user able to configure a server

**URL:** <https://forum.ansible.com/t/what-privilege-required-for-an-ansible-user-able-to-configure-a-server/33604>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [August 13, 2020, 12:30pm UTC](https://forum.ansible.com/t/what-privilege-required-for-an-ansible-user-able-to-configure-a-server/33604 "2020-08-13T12:30:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Edison\_Wang](https://avatars.discourse-cdn.com/v4/letter/e/ecb155/32.png) [@Edison\_Wang](https://forum.ansible.com/u/Edison_Wang)\
**Post date:** [August 13, 2020, 12:30pm UTC](https://forum.ansible.com/t/what-privilege-required-for-an-ansible-user-able-to-configure-a-server/33604/1 "2020-08-13T12:30:32Z")

</div>

Hi There,

I am pretty new in this domain and got a question to ask. My goal is to create a new user “edison” on a Ubuntu server. Now I’ve already had a user “manager” which is able to ssh to this Ubuntu server. This problem I got is after I run user creation role with user “manager” as ansbile\_user, the new user “edison” always failed to be created. Role is very simple, my question is if this issue would be caused by ansible\_user “manager” that doesn’t have some privilege?

role:

| |

---

<div class="post-metadata">

**Author:** ![Luca\_remix\_tj\_Lorenz](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@Luca\_remix\_tj\_Lorenz](https://forum.ansible.com/u/Luca_remix_tj_Lorenz)\
**Post date:** [August 13, 2020, 12:35pm UTC](https://forum.ansible.com/t/what-privilege-required-for-an-ansible-user-able-to-configure-a-server/33604/2 "2020-08-13T12:35:47Z")

</div>

Hello,

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [August 13, 2020, 12:36pm UTC](https://forum.ansible.com/t/what-privilege-required-for-an-ansible-user-able-to-configure-a-server/33604/3 "2020-08-13T12:36:05Z")

</div>

> Hi There,
> 
> I am pretty new in this domain and got a question to ask. My goal is to create a new user "edison" on a Ubuntu server.  
> Now I've already had a user "manager" which is able to ssh to this Ubuntu server. This problem I got is after I run user  
> creation role with user "manager" as ansbile\_user, the new user "edison" always failed to be created. Role is very  
> simple, my question is if this issue would be caused by ansible\_user "manager" that doesn't have some privilege?

That is the most likely cause of the error which you failed to post here.

Add "become: yes" to your playbook (or to this task).

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke

---

<div class="post-metadata">

**Author:** ![Edison\_Wang](https://avatars.discourse-cdn.com/v4/letter/e/ecb155/32.png) [@Edison\_Wang](https://forum.ansible.com/u/Edison_Wang)\
**Post date:** [August 13, 2020, 3:33pm UTC](https://forum.ansible.com/t/what-privilege-required-for-an-ansible-user-able-to-configure-a-server/33604/4 "2020-08-13T15:33:16Z")

</div>

Hi Luca:

I’ve added that command become: yes like you and Stefan said, and make my playbook as simple as below for a test. But after I run this playbook where I didn’t see any error, I still couldn’t see the new user “edison” created on target server. However if I run this playbook on my ansible control node, I can see the user "edison’’ created. The control node can login target server with ansbile\_user “manager”. Did I miss any part?

---

<div class="post-metadata">

**Author:** ![racke](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/racke/32/4767_2.png) [@racke](https://forum.ansible.com/u/racke)\
**Post date:** [August 13, 2020, 5:37pm UTC](https://forum.ansible.com/t/what-privilege-required-for-an-ansible-user-able-to-configure-a-server/33604/5 "2020-08-13T17:37:26Z")

</div>

> Hi Luca:
> 
> I've added that command become: yes like you and Stefan said, and make my playbook as simple as below for a test. But  
> after I run this playbook where I didn't see any error, I still couldn't see the new user "edison" created on target  
> server. However if I run this playbook on my ansible control node, I can see the user "edison'' created. The control  
> node can login target server with ansbile\_user "manager". Did I miss any part?
> 
> ---  
> - hosts: all  
> become: yes  
> tasks:  
> - name: add a new user  
> user:  
> name: it-manager  
> password: '$6$0r6COc71MvA$EGPPq9Tfq.BTNix2jWyDojB8qyFtKvSKiuXxCE4VRU4kiC5cgHvMwGklWxugfjUCYcc8hg2Sew1nIRMIcMgrB1'  
> shell: /bin/bash  
> state: present  
> groups: sudo

That playbook is creating a user with username it-manager.

Regards  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Racke
