Worked for me!
Ladies and gentleman, after weeks of trying to solve my slow shut down times, this finally solved my problem. In my case the console showed timeouts 20 seconds for com.apple.mDNSResponder and com.apple.securityd.
Above trick is back to 2 seconds - MBA 2011, 10.8.3.
type these commands into the terminal window one by one and right after terminal repair permissions in the disc utulity
sudo defaults write /System/Library/LaunchDaemons/com.apple.coreservices.appleevents ExitTimeOut -int 1
sudo defaults write /System/Library/LaunchDaemons/com.apple.securityd ExitTimeOut -int 1
sudo defaults write /System/Library/LaunchDaemons/com.apple.mDNSResponder ExitTimeOut -int 1
sudo defaults write /System/Library/LaunchDaemons/com.apple.diskarbitrationd ExitTimeOut -int 1
sudo defaults write /System/Library/LaunchAgents/com.apple.coreservices.appleid.authentication ExitTimeOut -int 1
Ladies and gentleman, after weeks of trying to solve my slow shut down times, this finally solved my problem. In my case the console showed timeouts 20 seconds for com.apple.mDNSResponder and com.apple.securityd.
Above trick is back to 2 seconds - MBA 2011, 10.8.3.