Making a logouthook

Discussion in 'macOS' started by SecurityTinker, Nov 30, 2008.

  1. SecurityTinker macrumors newbie

    May 11, 2008
    I know that there are million ways to make login actions, but I'd like to create actions upon logging out, in particular deleting parts of my home folder. Kind of like the Leopard guest account! Is there a way to do that?

    I don't know what is wrong! I have an image of my commands here. []

    As you can see, my script is about as simple as it can get. Why is it not deleting the keychain? I want to get rid of it when I log out. Yes I know that there are many workarounds including changing the keychain password and using ssh-agent, but I still want to know how to do this. It's such a simple script! Why is it not executing?
  2. BobZune macrumors 6502a

    Oct 26, 2007
  3. SecurityTinker thread starter macrumors newbie

    May 11, 2008
    The comments don't tell me much regarding my user, not system-wide situation. Plus, the Terminal commands that I issued should work....I really want to know what I'm doing wrong.
  4. SecurityTinker thread starter macrumors newbie

    May 11, 2008
    It looks like the "logouthook" feature is one of those things that's only system-wide. Like you know how you can write the key to your ~/Library/com...loginwindow file that says "change the loginwindow apple logo"? I don't think just anyone can do that. I'm thinking the logout hooks are the same way (only system wide).

    Can someone please test it? I don't own the Macs I work on, so I can't test it myself.

Share This Page