Fast User Switching is a feature in Mac OS X (and Windows for that matter) that allows you to switch user accounts without logging out of your computer. This allows multiple users to use the same computer without having privy to each others stuff and allows you a great way to leave the system if you have multiple people that use it (you don’t want others unlocking into your account, for example). Fast User Switching is disabled by default though. To enable fast user switching, open the System Preferences and click on the Accounts System Preference pane. Then, click on Login Options and click the Enable fast user switching checkbox.
To enable Fast User Switching from the Command Line you would use the following command:
defaults write /Library/Preferences/.GlobalPreferences MultipleSessionEnabled -bool YES
To then disable Fast User Switching from the Command Line you would simply change the boolean at the end to NO as follows:
defaults write /Library/Preferences/.GlobalPreferences MultipleSessionEnabled -bool NO