Sayyiduna Abu Hurayrah (may Allah be pleased with him) says that the Messenger of Allah (peace and blessings be upon him) came out and saw some people in Ramadan praying in a corner of the mosque. He (peace and blessings be upon him) asked: "Who are these people?" The people said: These are people who do not know the Qur'an by heart, and they were praying with Ubayy bin Ka'b (may Allah be pleased with him). He (peace and blessings be upon him) said: "They have done right, and they have done well."
Abu Dawud said: This hadith is not strong; Muslim bin Khalid is da'if (weak).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4612