Hadith: I am the city of knowledge and `Ali is its door

Explained by shaykh bin Baz (rahimuhullah), quoted from his Fatwas part 26, #229:

In his book entitled Kashf-ul-Khafa’, Al-`Ajluny said: “This Hadith is Mudtarib (a Hadith with disagreement over a transmitter or the text).” The same was said by Al-Daraqutny in his book entitled Al-`Ilal. Moreover, Al-Tirmidhy mentioned that the concerned Hadith is Munkar (rejected Hadith reported by a weak narrator whose narration conflicts with an authentic Hadith) while Al-Bukhari commented: “This Hadith has no Sahih (authentic) Sanad (chain of narrators).” In addition, Al-Khatib Al-Baghdady conveyed from Yahya ibn Ma`in that the latter said: “This Hadith is a lie that has no basis.” The weakness of the Hadith in question has been declared in different ways by many scholars such as Ibn Al-Jawzi who named it as a Hadith Mawdu` (fabricated Hadith) in his book Al-Mawdu`at. The same was stated by Al-Dhahaby and some other scholars. Abu Zur`ah commented on it saying: “This Hadith exposed many people.” Abu Hatim and Yahya ibn Sa`id said: “This Hadith has no valid source.” Ibn Daqiq Al-`Id said: “Scholars did not declare this Hadith as Sahih.” On the other hand, Al-Daylamy related a Hadith with no Sanad and declared it as Marfu` (a Hadith narrated from the Prophet with a connected or disconnected chain of narration) on the authority of Ibn Mas`ud: “I am the city of knowledge, Abu Bakr is its basis, `Umar is its walls, `Uthman is its roofs, and `Ali is its door.” Al-Daylamy also related another Hadith Marfu` on the authority of Anas: “I am the city of knowledge, `Ali is its door, and Mu`awiyah is its circlet.” He then said in his same book i.e. Al-Maqasid: “All these narrations are Da`if (weak) and most of their wordings are poor.” Al-Najm said: “All these narrations are Da`if and frail.” Rather, they are undoubtedly Mawdu`. May Allah grant us success!