The enemy of my enemy is NOT my friend. That's a second lesson I've learned by reading Steve Coll's history of U.S. involvement in Afghanistan before 9/11/2001. I hope Obama has learned it too.
From 1979 straight through the CIA's secret war against the Soviet Union, then the Soviet-backed government, and then al-Qaeda in Afghanistan, the U.S. largely relied on two nations with assets in country that the U.S. could not rival. Those two countries were Saudi Arabia and Pakistan. But Saudi Arabia could not go after bin Laden seriously for domestic political reasons, and they convinced themselves that the Taliban would gradually become more conservative, as the Saudis had done before them: more concerned with maintaining themselves in power than in spreading Islamic revolution. Saudi Arabia carried messages to both sides, but it never used its influence effectively to change the Taliban's stance toward the U.S., or to convince them to give up bin Laden.
Pakistan, meanwhile, had every reason to cooperate with bin Laden. He was training Islamic guerrillas that were tying down major parts of the Indian army in Kashmir, keeping India at bay without exposing Pakistan to direct confrontation. The ISI, Pakistan's intelligence agency, found ways of accepting U.S. money and using it to build its own influence in Afghanistan without serving U.S. interests.
Besides these two state actors, there was the Northern Alliance, headed by Ahmed Shah Massoud. Coll clearly has a soft spot for Massoud, "the Lion of Panjshir," but his book portrays him as another repressive thug, motivated by religion and nationalism, who cared about taking Afghanistan over from the Taliban but didn't see bin Laden as any particular threat. He would have been willing to kill him if he could, but he was in northern territories and bin Laden was mostly in the south and east. As long as U.S. policy was neutral between the Northern Alliance and the Taliban (which it was for years), it only made sense that Massoud would not stick his neck out to help the U.S. either.
We have to learn that other people and nations have interests and strategies of their own. They are not good guys because they do what Washington wants them to do, nor are they bad guys because they do something different. They are in business for themselves. If we want to do business with them, that's the first thing to recognize.