-5

I am surprised to see

$ sudo -v
[sudo] password for t: 

Why is its version worth protection?

Thanks.

3

To get sudo's version, use

sudo -V

This information is not protected, and does not require any sudoers privileges to execute (test with sudo -k; sudo -V).

As pointed out, sudo -v does something different.

A quick "meta" hack for finding version information:

man sudo | grep -i version

... which would result in (in part):

-V, --version

Print the sudo version string as well as the version string of the security policy plugin and any I/O

5

sudo -v does not provide the version information . sudo -V is the command for that.

2

Because

sudo -v

does not print the version information; it instead provides a way to the user to update the cached credentials without running an actual command. So it's supposed to ask for the user's password.

The command to print sudo's version is

sudo -V 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.