"Panic Password" on Linux

Because your post was very general and lacking in detail, my answer has to be very general and lacking in detail. Many of these steps are going to be distribution-specific.

In your situation, this is what I would do:

  1. Write a script that will perform the desired destruction.
  2. Create a panic user account and provide the user with a password.
  3. Make this user a member of the wheel group so his actions run like root's.
  4. Set the owner of the script to be the panic user.
  5. Set the permissions of the script so that it may be executed.
  6. Set this user's login sequence to include running the script created in step 1.
  7. Hope that you never have to log in as the panic user!

Good luck!


There is now a GPLv2-licensed PAM-module, that does exactly, what you wish. It allows the same account to login to the same Unix box with different passwords depending on what the user wishes done upon login. Interestingly enough, the author mentions the same book in his description of the module.

You write your own scripts, which will be associated with the different passwords -- from automatically attaching an encrypted filesystem upon entering a "safe" one to automatically wiping the same upon entering the "panic" one. And anything in between.

I wish, something similar were available from e-mail providers and various social media services -- to hide certain mailboxes, images, etc. when the user logs in with a special password. Maybe, we'll come to that too some day...