Back up any important data
Sign out of iCloud
Sign out of iMessage and FaceTime
Open System Settings
Go to General
Click Transfer or Reset
Click Erase All Content and Settings
Enter your administrator password
Follow the on-screen prompts
Wait for the iMac to erase and restart
Set up the iMac again or shut it down for the next user
