I'am talking about a very specific type of scenario here, which is not a situation where a foreign force is trying to occupy your territory, I am not even talking about a civil war here, but a situation where the own population is supposed to overthrow a tyranical regime, and 'historically' speaking cases where that happend, are extremly rare. And even if we would take the Vietnam war or similar conflicts as example you usually always had a situation where they had extensive support from the outside, North Vietnam and the Vietcong saw some very crucial help by the Soviet Union and China in training and equipment. To think about the Vietcong as nothing more but 'civilians' with Kalashinkovs runing around in sandals trough the jungle is exactly one of the mistakes many made when they got into Vietnam (no the Viet Cong have been proven to have been farmers with sandals and ak's running around with effective tactics learnt fighting the French, any outside training was minor and only given to very few)- it's like thinking about the Taliban as nothing more but goat herders with machine guns fighting in the hills (this is essentially what they are and are not now being trained by outside forces they aee being trained by there elders who were trained by the Americans to fight Russians). Their motivation alone to defend their country wasn't the key to their success (very arguable here as this is generally seen as the biggest thing needed to have success), but they also saw extensive training and support by military advicors giving them some knowledge in tactical maners, building explosives, shooting machineguns and laying traps isn't something that you pick up on the rice field (no they picked it up fighting the French who were fully unprepared to fight to hold another country only 10-20 years after getting their's back.), now combine that with the incompetent South Vietnamese regime which was hated by its own people and which was completey infiltrated by the VC and it becomes a lot more clear what the issue was. We should also not forget that the Vietcong wasn't the only force the US and South Vietnam was dealing with in the Vietnam Conflict, since there was always the NVA as well, short for People's Army of Vietnam which in the end overthrew the Regime in Saigon once the US left, South Vietnam didn't necessarily loose because their enemy was so extremly cuning and powerfull, but because they actually had a very incompetent leadership which was hated by its own people. (yes the south was incompetent).
You're having a way to simplistic view on those historic events here if you think people with guns are all it needs.