Farmers would be necessary for long-term survival, but you could live off preserved food for a long time, if you were near a grocery store or something. Still, eventually, you would have to either start growing food, or try to find another source of food.
Engineers/Scientists/Programmers would be pretty high up on the list, as they could get a lot of the advanced pre-war tech to work, so you might be able to do something like in Gecko, and get a nuclear power plant up and running. Also would provide you with a major tactical advantage against the looters/raiders that would inevitably crop up after an apocalypse scenario.
Doctors would be very useful if you wanted to expand your group, settle down, and build a town, but if it's only a few people and you're trying to find a safe place to stay, then all you'd need would be a first aid kit for minor wounds.
Leaders(politicians, mayors, etc) would be almost completely useless, as they would have no necessary skills, and any group large enough to need a mayor would most likely have someone in it already that would be good for that job.
Teachers would be necessary eventually, when civilization began to appear again, but otherwise, it would be the people with useful skills' job to transfer those skills to the next generation.
TheLostOne said:
I'd say having at least a few trained soldiers to serve as the core of a militia are essential. Sure anyone can learn to shoot, but tactics require study and chances are there are going to be people out there that think banding together and preying on others beats digging their hands in the dirt.
I don't think they would teach advanced tactics to grunts. They would know more about them than the average person, but not by much. They would be kind of useful, but in a town, there would always be the risk that they might take control, as they would be the only people who knew how to use the guns.
Entertainers would help keep morale up, but all you'd need to do the same thing would be plenty of books and holovids.