[sudo-users] No error message if reading password fails
R. Diez
rdiezmail-temp2 at yahoo.de
Mon Oct 8 06:34:36 MDT 2018
> Note that reading from /dev/null does not produce an error, it just
> returns end of file. So for:
>
> rdiez at UbuntuMate:~$ sudo -S -- ls </dev/null
>
> sudo is doing the expected thing. This is the same as what would
> happen if you entered control-D at the password prompt.
> [...]
What is the "expected thing" in this scenario then? Is it documented or
expected that an "end of file" condition makes sudo quit without an
error message and without trying to run the command the user specified?
I would argue otherwise.
rdiez
More information about the sudo-users
mailing list