President Barack Obama has named United Nations ambassador Susan Rice to take over as national security adviser in a shakeup of his foreign policy team.