** Description changed: [ Impact ] * Ansible users cannot perform password-authenticated privilege escalation on Ubuntu systems using sudo-rs. After entering the correct become password, Ansible fails with "Timed out waiting for become success or become password prompt". [ Test Plan ] * Install the necessary dependencies: apt-get install -y --no-install-recommends ansible-core sudo sudo-rs locales language-pack-de language-pack-fr language-pack-es - * Set up a separate ansiblebug user: + * Set up a separate ansiblebug user: useradd -m -s /bin/bash ansiblebug printf 'ansiblebug:lp-2122414-fixture\n' | chpasswd printf 'ansiblebug ALL=(ALL:ALL) ALL\nDefaults:ansiblebug timestamp_timeout=0\n' > /etc/sudoers.d/lp-2122414 chown root:root /etc/sudoers.d/lp-2122414 chmod 0440 /etc/sudoers.d/lp-2122414 - * Run the following command and enter "lp-2122414-fixture" at each + * Run the following command and enter "lp-2122414-fixture" at each prompt: for lang in C.UTF-8 de_DE.UTF-8 fr_FR.UTF-8 es_ES.UTF-8; do - runuser -u ansiblebug -- env LANG="$lang" LC_ALL="$lang" \ - ansible all -i localhost, -c local -b -K -m command -a 'id -un' \ - -e 'ansible_become_exe=/usr/bin/sudo-rs ansible_python_interpreter=/usr/bin/python3 ansible_local_become_success_timeout=3' + runuser -u ansiblebug -- env LANG="$lang" LC_ALL="$lang" \ + ansible all -i localhost, -c local -b -K -m command -a 'id -un' \ + -e 'ansible_become_exe=/usr/bin/sudo-rs ansible_python_interpreter=/usr/bin/python3 ansible_local_become_success_timeout=3' done - * With the fix, the expected output is 4 times: - BECOME password: + * With the fix, the expected output is 4 times: + BECOME password: localhost | CHANGED | rc=0 >> root - [ Where problems could occur ] * The change affects sudo become password-prompt detection. Regressions could cause missed prompts and timeouts, false recognition of unrelated output, or incorrect repeated-password handling. * Changes do not and can't bypass sudo authentication. [ Other Info ] * Both commits for resolute are unchanged from the merged upstream pull requests. + + * The fix landed in 2.22 as a cherry-pick, so no change is needed for + tenacious + (https://github.com/ansible/ansible/commit/d44351080d2fd68080c818d3df28def499e16702) --- When using ansible with a site or a task using "become: yes", ansible will prompt for the password (forwarded to sudo) before running. When doing so with sudo-rs, after the password is provided by the user, ansible hangs and then throws the following error: "Timed out waiting for become success or become password prompt" When setting sudo.ws as the default with update-alternatives, ansible proceeds as expected after the password is provided. DistroRelease: Ubuntu 25.10 Package: ansible-core 2.19.0-1ubuntu1
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2122414 Title: Ansible times out after BECOME password request To manage notifications about this bug go to: https://bugs.launchpad.net/ansible/+bug/2122414/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
