# Timeout (XXs) waiting for privilege escalation prompt

**URL:** <https://forum.ansible.com/t/timeout-xxs-waiting-for-privilege-escalation-prompt/40154>\
**Category:** Get Help\
**Tags:** playbook, ubuntu\
**Created:** [February 10, 2025, 2:45pm UTC](https://forum.ansible.com/t/timeout-xxs-waiting-for-privilege-escalation-prompt/40154 "2025-02-10T14:45:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rparedis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rparedis/32/7543_2.png) [@rparedis](https://forum.ansible.com/u/rparedis)\
**Post date:** [February 10, 2025, 2:45pm UTC](https://forum.ansible.com/t/timeout-xxs-waiting-for-privilege-escalation-prompt/40154/1 "2025-02-10T14:45:37Z")

</div>

Hi!

Ansible is working fine on my servers, but on some machines, I get the following error when running superuser commands:

```auto
fatal: [143.129.78.26]: FAILED! => {
    "msg": "Timeout (32s) waiting for privilege escalation prompt: \u001b]11;?\u001b\\\u001b[6n\u001b[?25l\u001b[?2004h\r \u001b[D\u001b[2K\r"
}

```

All my machines are imaged using FOG, so they have the same OS. The machines that do not work are linked to another network adapter, but are part of the same subnet. A simple ping playbook works on all machines…

What could be the problem?

Cheers!

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [February 10, 2025, 4:56pm UTC](https://forum.ansible.com/t/timeout-xxs-waiting-for-privilege-escalation-prompt/40154/2 "2025-02-10T16:56:12Z")

</div>

The ping module does not use privilege escalation.  
So the problem is actually with privilege escalation.  
Since you already found out what the common denominator is, that is where to look further.  
The obvious thing to do is sign in manually and diagnose sudo (or whatever you use) on the affected hosts.

DIck

---

<div class="post-metadata">

**Author:** ![rparedis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rparedis/32/7543_2.png) [@rparedis](https://forum.ansible.com/u/rparedis)\
**Post date:** [February 12, 2025, 7:53am UTC](https://forum.ansible.com/t/timeout-xxs-waiting-for-privilege-escalation-prompt/40154/3 "2025-02-12T07:53:07Z")

</div>

Thanks for your reply!  
From what I can see, there is no problem on these machines when using sudo manually, or through an ssh connection.

I can run the following command as well:

```auto
ssh root@143.129.78.26 shutdown -h now

```

The fact that the other machines that work have the exact same image makes me wonder if it is a networking issue, but then again, other ssh commands and playbooks still work…

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [February 12, 2025, 8:30am UTC](https://forum.ansible.com/t/timeout-xxs-waiting-for-privilege-escalation-prompt/40154/4 "2025-02-12T08:30:58Z")

</div>

What is your privilege escalation setup?  
It defaults to sudo but it may be different in your case, for example something that relies on specific network connectivity.  
I imagine something that does lookups in some sort of directory.

---

<div class="post-metadata">

**Author:** ![rparedis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rparedis/32/7543_2.png) [@rparedis](https://forum.ansible.com/u/rparedis)\
**Post date:** [February 12, 2025, 8:41am UTC](https://forum.ansible.com/t/timeout-xxs-waiting-for-privilege-escalation-prompt/40154/5 "2025-02-12T08:41:38Z")

</div>

It should be set to sudo. There are no settings in the ansible config (other than a 30 second timeout).

I created a simple playbook that also fails:

```auto
---
- name: Test
  hosts: "143.129.78.26"
  become: yes
  tasks:
  - name: Testing
    shell: echo $USER

```

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [February 12, 2025, 10:08am UTC](https://forum.ansible.com/t/timeout-xxs-waiting-for-privilege-escalation-prompt/40154/6 "2025-02-12T10:08:10Z")

</div>

If you run that same simple playbook for both a working host and a failing one, with -vvvvv, and then compare the verbose logs?

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [February 12, 2025, 3:53pm UTC](https://forum.ansible.com/t/timeout-xxs-waiting-for-privilege-escalation-prompt/40154/7 "2025-02-12T15:53:56Z")

</div>

The ansible.cfg could be empty, but sudo could still be configured. Is it consistent, or triggered by something? If it’s consistent for certain hosts, check if any of the inventory variables are configuring [ansible.builtin.sudo become – Substitute User DO — Ansible Community Documentation](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/sudo_become.html) differently than the other hosts.

---

<div class="post-metadata">

**Author:** ![rparedis](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/rparedis/32/7543_2.png) [@rparedis](https://forum.ansible.com/u/rparedis)\
**Post date:** [February 14, 2025, 2:13pm UTC](https://forum.ansible.com/t/timeout-xxs-waiting-for-privilege-escalation-prompt/40154/8 "2025-02-14T14:13:54Z")

</div>

Thank you for your replies!  
Diffing both outputs made me realize that I accidentally put an ansible\_user differently in the inventory.

Weird that this user is used as opposed to the default become\_user; but my issue appears to be solved…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 16, 2025, 2:14pm UTC](https://forum.ansible.com/t/timeout-xxs-waiting-for-privilege-escalation-prompt/40154/9 "2025-03-16T14:14:16Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
