red_Marvin said: I don't see how that contradicts the documentation, you are running two different shells/prompts, sudo in the first one, won't set the timestamp for the second terminal, you will still be asked for the password.
sudo -k in one of the terminals will in the same way not affect the other terminal. This is even true for two bash prompts running through screen.
Well, here is what the man page for sudo says about -K and -k. I've emphasized 2 things that I feel don't agree with the actual behavior of sudo.
-K The -K (sure kill) option is like -k except that it removes the user’s timestamp entirely. Like -k, this option does not require a password.
-k The -k (kill) option to sudo invalidates the user’s timestamp by setting the time on it to the Epoch. [B]The next time sudo is run a password will be required. [/B] This option does not require a password and was added to [B]allow a user to revoke sudo permissions from a .logout file.[/B]
I don't see anything in there about "unless you happen to have another shell open somewhere" and the logout part is just flat out wrong, IMHO the correct behavior for sudo -k or -K would be to require a password the next time it is invoked, regardless of from which shell session or tty. If -k or -K doesn't do this by design, then it should be explained, and an option that DOES have this behaviour really needs to be added.