Idea #1 - Hidden OS
As an alternative method you could make use of TrueCrypt's "Hidden Operating System". This allows you to access a fake alternative OS when a certain password is used, rather than the primary OS.
excerpt
If your system partition or system drive is encrypted using TrueCrypt, you need to enter your pre-boot authentication password in the TrueCrypt Boot Loader screen after you turn on or restart your computer. It may happen that you are forced by somebody to decrypt the operating system or to reveal the pre-boot authentication password. There are many situations where you cannot refuse to do so (for example, due to extortion). TrueCrypt allows you to create a hidden operating system whose existence should be impossible to prove (provided that certain guidelines are followed — see below). Thus, you will not have to decrypt or reveal the password for the hidden operating system.
Bruce Schneier covers the efficacy of using these (Deniable File Systems, so you might want to investigate it further before diving in.
The whole idea of Deniable Encryption is a bit of a can of worms, so caution around using it in certain situations needs to be well thought out ahead of time.
Idea #2 - Add a script to /etc/passwd
You can insert alternative scripts to a user's entry in the /etc/passwd
file.
Example
# /etc/passwd
tla:TcHypr3FOlhAg:237:20:Ted L. Abel:/u/tla:/usr/local/etc/sdshell
You could setup a user's account so that it runs a script such as /usr/local/etc/sdshell
which will check to see what password was provided. If it's the magical password that triggers the wipe, it could begin this process (backgrounded even) and either drop to a shell or do something else.
If the password provided is not this magical password, then continue on running a normal shell, /bin/bash
, for example.
Source: 19.6.1 Integrating One-Time Passwords with Unix
dd if=/dev/urandom of=/dev/$HOME
isn't going to do much good. Even assuming they're stupid enough to use the operating system instead of removing the disk and reading it directly, there are forensic recovery companies that can get data from a disk that's been overwritten and physically burned.