My 20-month-old son does the same thing, as do all of his friends. It's a toddler-thing - my best guess is that it gives them a sense of control, being able to open and close the doors. And it's fun, too! I don't worry too much about correcting my son, as much as I do redirecting his energy. Most of the time, doors he shouldn't be getting into are locked, anyway. At home, either lock the doors to rooms you don't want him to access, or put on those safety knob things you can buy at ToysRUs or Home Depot or the like, so he can't open them so easily. For doors you don't mind him opening, let him play! Turn it into a game - make him wait until you knock to open it, and it's a massive game of peek-a-boo. For away, tell him "No, we don't open doors that don't belong to us", and redirect him elsewhere. (Or whatever wording works best for you.) Opening and closing doors isn't a BAD thing, it's just something that is only appropriate sometimes.