I've found the best way to kill su
during entering of an incorrect password is Control+U followed by Control+D. This should avoid annoying delays. You can also just clear the input with Control+U and re-try typing the password in.
Control+U is a command that clears the current line of text, and also works in a shell (and probably other places too). It's also nice that it seems to work with su
to clear the currently-entered password.
Using Control+C doesn't seem to work, it appears that for some reason su
just ignores it. It is untrue that the user who started the process can no longer kill it because of setuid -- su
dies perfectly fine if you kill it with SIGTERM
or SIGQUIT
from another terminal (as a user that started it). SIGINT
doesn't work, so su
probably just ignores it.
Control+D with an empty password input seems to be the only way to instantly kill a running su
- if any text is entered, then hitting Control+D will induce a 3-second delay (unless you've actually typed in the correct password, in which case... it'll start a root shell).