You are here
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.
This is definitely a toddler thing, he's just exercising a new skill. At home, make sure that any doors he shouldn't open are securely closed and have a door knob lock or cover that he can't use. In public you should try to redirect his focus as playing with doors can be dangerous. My kids love doors but I always keep them away from them because as toddlers, they're small and hard for people to see. And if you're inside someone else coming in won't know they're behind the door and they could get hit.