Sahih Bukhari Volume 9, Book 89, Hadith Number 261.

Narrated By ‘Abdur-Rahman bin Samura : Allah’s Apostle said, “O ‘Abdur-Rahman bin Samura! Do not seek to be a ruler, for if you are given authority on your demand, you will be held responsible for it, but if you are given it without asking for it, then you will be helped (by Allah) in it. If you ever take an oath to do something and later on you find that something else is better, then do what is better and make expiation for your oath.”