Interesting article on this.
http://usmilitary.about.com/cs/militarylaw1/a/obeyingorders.htm
These articles require the obedience of LAWFUL orders. An order which is unlawful not only does not need to be obeyed, but obeying such an order can result in criminal prosecution of the one who obeys it. Military courts have long held that military members are accountable for their actions even while following orders -- if the order was illegal. "I was only following orders," has been unsuccessfully used as a legal defense in hundreds of cases (probably most notably by Nazi leaders at the Nuremberg tribunals following World War II). The defense didn't work for them, nor has it worked in hundreds of cases since.
http://usmilitary.about.com/cs/militarylaw1/a/obeyingorders.htm