Sahih Muslim Book 020, Hadith Number 4551.
Chapter : Obedience to be shown to the (Caliphs) even if they withhold the people's due rights.
It has been narrated on the authority of Alqama b. Wai'l al-Hadrami who learnt the tradition from his father. The latter said: Salama b. Yazid al-ju'afi asked the Messenger of Allah (may peace be upon him): Prophet of Allah, what do you think if we have rulers who rule over us and demand that we discharge our obligations towards them, but they (themselves) do not discharge their own responsibilities towards us? What do you order us to do? The Messenger of Allah (may peace be upon him) avoided giving any answer. Salama asked him again. He (again) avoided giving any answer. Then he asked again-it was the second time or the third time-when Ash'ath b. Qais (finding that the Holy Prophet was unnecessarily being pressed for answer) pulled him aside and said: Listen to them and obey them, for on them shall he their burden and on you shall be your burden.