أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا اللَّيْثُ، عَنْ عُبَيْدِ اللَّهِ بْنِ أَبِي جَعْفَرٍ، عَنْ نَافِعٍ، عَنِ ابْنِ عُمَرَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ عَلَى الْمَرْءِ الْمُسْلِمِ السَّمْعُ وَالطَّاعَةُ فِيمَا أَحَبَّ وَكَرِهَ إِلاَّ أَنْ يُؤْمَرَ بِمَعْصِيَةٍ فَإِذَا أُمِرَ بِمَعْصِيَةٍ فَلاَ سَمْعَ وَلاَ طَاعَةَ ‏"‏ ‏.‏

It was narrated that Ibn 'Umar said: "The Messenger of Allah said: 'The Muslim must hear and obey whether he likes it or not, unless he is commanded to commit an act of disobedience. If he is commanded to commit an act of disobedience, then he is not required to hear and obey."' Translation Not Available

Book Ref: Sunan An Nisai Book 39 Hadith 4206
Web Ref:  Sunan An Nisai Vol 5 Book 39 Hadith 4211