[Bug 2136942] [NEW] The visudo command fails to read files passed via stdin

Younes Manton 2136942 at bugs.launchpad.net
Sat Dec 20 23:15:48 UTC 2025


Public bug reported:

Expected output (as seen in 24.04, 25.04):

$ cat /etc/sudoers | visudo -c -f -
stdin: parsed OK
/etc/sudoers.d/90-cloud-init-users: parsed OK
/etc/sudoers.d/README: parsed OK

Actual output (as seen in 25.10):

$ cat /etc/sudoers | visudo -c -f -
visudo: unable to open -: No such file or directory (os error 2)

Ansible's community.general.sudoers module hits this bug because it
relies on sudo being able to consume stdin to do validation.

Bug is fixed upstream:

https://github.com/trifectatechfoundation/sudo-rs/issues/1358

** Affects: rust-sudo-rs (Ubuntu)
     Importance: Undecided
         Status: New

** Summary changed:

- The sudo command fails to read files passed via stdin
+ The visudo command fails to read files passed via stdin

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to rust-sudo-rs in Ubuntu.
https://bugs.launchpad.net/bugs/2136942

Title:
  The visudo command fails to read files passed via stdin

Status in rust-sudo-rs package in Ubuntu:
  New

Bug description:
  Expected output (as seen in 24.04, 25.04):

  $ cat /etc/sudoers | visudo -c -f -
  stdin: parsed OK
  /etc/sudoers.d/90-cloud-init-users: parsed OK
  /etc/sudoers.d/README: parsed OK

  Actual output (as seen in 25.10):

  $ cat /etc/sudoers | visudo -c -f -
  visudo: unable to open -: No such file or directory (os error 2)

  Ansible's community.general.sudoers module hits this bug because it
  relies on sudo being able to consume stdin to do validation.

  Bug is fixed upstream:

  https://github.com/trifectatechfoundation/sudo-rs/issues/1358

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rust-sudo-rs/+bug/2136942/+subscriptions




More information about the foundations-bugs mailing list