Allah Taala said:
[Shakir 4:59] O you who believe! obey Allah and obey the Messenger and those in authority from among you; then if you quarrel about anything, refer it to Allah and the Messenger, if you believe in Allah and the last day; this is better and very good in the end.
Imam AbdhulHay al-Lucknawi said in his book:
Narrated ibn Abi Shaibah, Abd ibn Humaid, ibn Jareer, and ibn Munzir from Mujahid, which said about words of Allah “O you who believe! obey Allah and obey the Messenger and those in authority from among you” (that is mean) – companions of Muhammad, people of intelligence, fiqh and religion.
Abd ibn Humaid, ibn Jareer and ibn Abu Hatim, ibn Asakir narrated from Ikrima, that about words of Allah ” and those in authority” he said: Abu Bakr, Umar, Uthman, Ali and ibn Masood.
Saeed ibn Mansoor narrated from Ikrima, that he was asked about (slave women) mothers of children (of their masters). Should they be set free? He said: Yes. When he was asked by what proof he gave such fatwa, he said: By Quran. He was asked by what verse in the Quran? He answered: “O you who believe! obey Allah and obey the Messenger and those in authority from among you” . Umar was from ” those in authority” , and he use to say: Free them, even if embryo was dropped.
Ibn Hajar al-Haythami mentioned in “Sawaiq al-Muhriqa” and others, that when Hasan ibn Ali made peace with Moawiyah, he (Hasan) wrote a letter to him: “Bismillahi Rahmani Rahim. This is upon what Hasan ibn Ali made treaty with Moawiyah ibn Abu Sufyan: He would give him wilayah of Muslims upon condition that he would act among them upon the book of Allah, Sunnah of Prophet, and Life of Rightly Guided Caliphs after him…”
Source: Abdulhay al-Lucknawi “Tuhfatul Ahyar bi Ahya Sunnat Saeedal Abrar” pp 66-67, Darul Bashar al-Islamiyah.
Imam Shawkani in “Fath al-Qadeer” said:
Abd ibn Humaid, ibn Jareer, ibn Abi Hatim narrated from Ata, which said regarding words “and those in authority from among you”, this mean authority in Fiqh, and Knowledge.
Saeed ibn Mansur, ibn Abi Sheiba, Abd ibn Humaid, ibn Munzir, ibn Abu Hatim narrated from Abu Huraira, that under words “and those in authority” mean commanders. And in other version commanders of army.
Ibn Abi Sheiba, Abd ibn Humaid, Hakim at-Tirmizi, ibn Jareer, ibn Munzir, ibn Abu Hatim, Hakim which authenticated it, narrated from Jabir ibn Abdullah, which said regarding these words “and those in authority”, this mean people of knowledge.
Same was narrated by Saeed ibn Mansur, Abd ibn Humaid, ibn Jareer, ibn Munzir, ibn Abu Hatim from Mujahid and by ibn Abu Sheiba and ibn Jareer from Abul Aliyah.
Source: Imam Shawkani in “Fath al-Qadeer”, page 392, Darul ibn Jawzi.