Full Sharh — Sahih Muslim 1467
وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ إِدْرِيسَ، عَنْ شُعْبَةَ، عَنْ أَبِي عِمْرَانَ، عَنْ عَبْدِ اللَّهِ بْنِ الصَّامِتِ، عَنْ أَبِي ذَرٍّ، قَالَ إِنَّ خَلِيلِي أَوْصَانِي أَنْ أَسْمَعَ وَأُطِيعَ وَإِنْ كَانَ عَبْدًا مُجَدَّعَ الأَطْرَافِ وَأَنْ أُصَلِّيَ الصَّلاَةَ لِوَقْتِهَا " فَإِنْ أَدْرَكْتَ الْقَوْمَ وَقَدْ صَلَّوْا كُنْتَ قَدْ أَحْرَزْتَ صَلاَتَكَ وَإِلاَّ كَانَتْ لَكَ نَافِلَةً " .
English Translation
Abu Dharr reported:My friend (the Holy Prophet) bade me to hear and obey (the ruler) even if he is a slave having his feet and arms cut off, and observe prayer at its prescribed time. (And further said): It you find people having observed the prayer, you in fact saved your prayer, otherwise (if you join with them) that would be a Nafl prayer for you
Source
Sahih Muslim(صحيح مسلم)
The Book of Mosques and Places of Prayer
Hadith Number
1467