# Permissions issue, cannot become root

**URL:** <https://forum.ansible.com/t/permissions-issue-cannot-become-root/24830>\
**Category:** Ansible Project\
**Created:** [June 27, 2017, 4:44pm UTC](https://forum.ansible.com/t/permissions-issue-cannot-become-root/24830 "2017-06-27T16:44:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lask001](https://avatars.discourse-cdn.com/v4/letter/l/4da419/32.png) [@lask001](https://forum.ansible.com/u/lask001)\
**Post date:** [June 27, 2017, 4:44pm UTC](https://forum.ansible.com/t/permissions-issue-cannot-become-root/24830/1 "2017-06-27T16:44:00Z")

</div>

Been banging my head against this since yesterday, hoping someone is able to shed some insight on my issues.

I have a simple role that I’m trying to install java with:

`

---

<div class="post-metadata">

**Author:** ![Dick\_Davies](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Dick\_Davies](https://forum.ansible.com/u/Dick_Davies)\
**Post date:** [June 28, 2017, 10:28am UTC](https://forum.ansible.com/t/permissions-issue-cannot-become-root/24830/2 "2017-06-28T10:28:25Z")

</div>

become\_user is the user you sudo to, that should probably not be the  
same as remote\_user  
(or it's a bit of a waste of time).

---

<div class="post-metadata">

**Author:** ![Daniel\_JD](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@Daniel\_JD](https://forum.ansible.com/u/Daniel_JD)\
**Post date:** [June 30, 2017, 8:08pm UTC](https://forum.ansible.com/t/permissions-issue-cannot-become-root/24830/3 "2017-06-30T20:08:13Z")

</div>

To install packages you need to be root. So set become\_user to root. Now you need to give ansible your sudo password via “-K”. You dont need the become\_method or become\_flags

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 4, 2017, 3:14am UTC](https://forum.ansible.com/t/permissions-issue-cannot-become-root/24830/4 "2017-07-04T03:14:31Z")

</div>

you don't even need become\_user: root as that is the default.

---

<div class="post-metadata">

**Author:** ![prakash\_ranjan](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@prakash\_ranjan](https://forum.ansible.com/u/prakash_ranjan)\
**Post date:** [August 11, 2017, 6:58pm UTC](https://forum.ansible.com/t/permissions-issue-cannot-become-root/24830/5 "2017-08-11T18:58:47Z")

</div>

I am also facing the same issue. tried several options but no solution.

Unable to take privilege of “sudo su -”.

This is content of my playbook. Commented ones shows that I have tried those options. I have also tried many options with command lines.
