It is narrated from Sayyiduna Ubadah bin al-Samit (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) enjoined seven things upon us, saying: "Do not associate anything with Allah, even if you are cut into pieces, or burned, or crucified. Do not abandon the prayer deliberately, for whoever abandons it deliberately has left the religion. Do not commit disobedience, for it is the cause of Allah's displeasure. Do not go near wine, for it is the root of all sins. Do not flee from death or being killed, even if you are right in the face of it. Do not disobey your parents; even if they order you to leave all of your world, then leave it. Do not lift your stick from your family (for their discipline and correction), and treat them with fairness on your own part."
These are the words of al-Allaf (Yahya bin Ayyub). In the narration of Abu Bakr bin Abd al-Rahim the words are "seven traits", (then) "Do not associate (anything) with Allah", and in his version: "And do not go near wine, for it is the root of all sins"; the rest of the narration is like it.