Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I run Linux on my netbook with an encrypted home directory (decrypted when I log in). One idea I had (partly from Cory Doctorow's Little Brother) was to have a password that I could enter which would login to a fake user account while performing a command (e.g trashing the contents of the disk drive or changing the encryption passwords to something random and very long).

Any ideas how to do this? (Answers involving obscure kernel modules etc are welcomed, though as always a nice command line utility might be a bit nicer! I especially like to have the same username but not the same password: user bob signs in with password ABC and gets logged in, but user bob signs in with password 123 and gets his stuff deleted.)

share|improve this question
    
Maybe others understand it, but just in case I'm not the only one oblivious about that book: any details about what that book says about panic accounts? (I might read it myself as apparently the Dutch version is officially also available as a DRM-free, free-as-in-beer download at craphound.com/littlebrother) –  Arjan Nov 18 '09 at 15:54
1  
It doesn't talk in detal - the narrator briefly describes wishing he had created a panic password on his mobile phone before giving away his password to DHS. –  Elliot Hughes Nov 18 '09 at 15:56
    
Aha, eleven81's answer and your comment make clear I was missing the point. :-) (Added it to your question just in case there's more people like me.) –  Arjan Nov 18 '09 at 16:44
    
I've got Little Brother at home... I'll read it after I'm done Mostly Harmless. :) –  muntoo Apr 21 '11 at 18:21

1 Answer 1

up vote 7 down vote accepted

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!

share|improve this answer
    
Good answer - however what I had hoped for in my original post was to have the same username but not the same password (ie user bob signs in with password ABC and gets logged in, but user bob signs in with password 123 and gets his stuff deleted). As to being specific about distribution - I wanted to avoid this as I would want to do this on the various distributions I have installed at different times. –  Elliot Hughes Nov 18 '09 at 15:58
    
(though if it interests you my netbook is at present running Ubuntu 9.10) –  Elliot Hughes Nov 18 '09 at 16:06
    
In that case, I think you would have to do something crazy with the login application. You'd just need to edit it to run a certain script when a certain password is used. This I don't know how to do and you may even have to write your own login manager. –  Jonno_FTW Nov 18 '09 at 16:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.