US President Barack Obama vowed not to campaign or vote for any candidate, including Democrats, who opposes tighter gun laws, as he publicly challenged critics of his policies.