0

Is there a way to run a shell script if a specific incorrect password is entered in the bash login? (ie. my actual password is dog, but when I type in only cat it runs a script. I'm hoping to use this so I can subtly shutdown / wipe my laptop while appearing to just be entering my password.

  • I recommend looking into SSH thoroughly. So far as I know you can’t do that just with a login prompt, but you can have SSH keys that trigger a specific action when you connect to a computer with them. – Wildcard Jun 21 '19 at 21:28
  • 3
    Note that bash does not have a login. The login is handled by other means before the shell is even involved, which depends on the variant of Unix that you are running, which you have not mentioned. – Kusalananda Jun 21 '19 at 21:32
  • maybe you need a fake login screen ... that way you could appear to actually log in, but the wipe process would start in background – jsotola Jun 21 '19 at 22:26
  • look into this ... Plausibly Deniable File System – jsotola Jun 21 '19 at 22:30

Your Answer

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

Browse other questions tagged or ask your own question.