# Become sudo hangs on first sudo on OSX

**URL:** <https://forum.ansible.com/t/become-sudo-hangs-on-first-sudo-on-osx/37777>\
**Category:** Ansible Project\
**Created:** [March 17, 2023, 9:38am UTC](https://forum.ansible.com/t/become-sudo-hangs-on-first-sudo-on-osx/37777 "2023-03-17T09:38:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![user120](https://avatars.discourse-cdn.com/v4/letter/u/ed655f/32.png) [@user120](https://forum.ansible.com/u/user120)\
**Post date:** [March 17, 2023, 9:38am UTC](https://forum.ansible.com/t/become-sudo-hangs-on-first-sudo-on-osx/37777/1 "2023-03-17T09:38:09Z")

</div>

Hi, ansible community! I have encountered an issue where if sudo -i has not been executed in the current command line session before, the become:true portion in Ansible will get stuck.

```auto

- hosts: localhost
connection: local
gather_facts: true

tasks:
- name: "verify become is not stuck"
ansible.builtin.command: "echo ok"

```

Has anyone else encountered the same issue? Or is this a known problem?

My envirement info:

```auto

ansible [core 2.14.3]
config file = None
configured module search path = ['/Users/meta/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/homebrew/Cellar/ansible/7.3.0/libexec/lib/python3.11/site-packages/ansible
ansible collection location = /Users/meta/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/homebrew/bin/ansible
python version = 3.11.2 (main, Feb 16 2023, 02:55:59) [Clang 14.0.0 (clang-1400.0.29.202)] (/opt/homebrew/Cellar/ansible/7.3.0/libexec/bin/python3.11)
jinja version = 3.1.2
libyaml = True

```
