1

Sometimes I type 'sudo su - user' in linux and then realise I'm typing it from an application account rather than a user account. I want to ctrl+c to abort the password entry. When I do this, it always freezes for a couple of seconds before it aborts the process and returns me to the shell.

What causes this pause? Can it be bypassed?

1
  • 6
    Try asking at superuser.com, this is not programming related
    – Ishtar
    Dec 6 '10 at 13:05
2

It's an anti-password-attack feature. It makes it more difficult (or at least slower) to try many passwords in tight loop

2
  • While this is true, it seems unlikely to be the explanation when you're aborting the attempt with CTRL+C. You aren't actually trying the password that way, so there seems to be no security risk.
    – Cody Gray
    Dec 6 '10 at 15:22
  • 1
    You clearly have an insufficiently warped mind :) You could speed attacks up by doing 'sudo touch /tmp/password-worked" and sending SIGTERM shortly afterwards - since a successful password attempt completes quickly, you would know quickly whether the attempt had worked or not. So there is a security risk. Dec 6 '10 at 15:29

Your Answer

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