The shuffle comes weeks after the defeat in parliament of a measure that would have allowed Mr. Obasanjo to run for a third term .