The obligation to command one's family and children and whoever is in one's care to obey Allah, and to forbid them to oppose Him, teaching them proper behaviour and preventing them from committing what is prohibited

Riyad as-Salihin (The Meadows of the Righteous)

by Imam Nawawi

38. Chapter: On the obligation to command one's family and children and whoever is in one's care to obey Allah, and to forbid them to oppose Him, teaching them proper behaviour and preventing them from committing what is prohibited

Allah Almighty says, "Instruct your family to do the prayer and be constant in it," (W20:131; H20:132)

and the Almighty says, "O you who believe, safeguard yourselves and your families from a Fire." (66:6)
 

298. Abu Hurayra said, "Al-Hasan ibn 'Ali took a date from the sadaqa dates and put it in his mouth. The Messenger of Allah, may Allah bless him and grant him peace, said, 'No, no! Spit it out'. He said, 'Are you not aware that we do not eat sadaqa?'" [Agreed upon]

In one variant, "Sadaqa is not lawful for us."

299. Abu Hafs 'Umar ibn Abi Salama 'Abdu'l-Asad, the stepson of the Messenger of Allah, said, "I was a child under the guardianship of the Messenger of Allah, may Allah bless him and grant him peace, and my hand would go around in the dish. The Messenger of Allah, may Allah bless him and grant him peace, said to me, 'Boy, say the name of Allah Almighty and eat with your right hand and eat what is in front of you.' That became the way I ate ever afterwards." [Agreed upon]

300. Ibn 'Umar said, "I heard the Messenger of Allah, may Allah bless him and grant him peace, say, 'All of you are shepherds and each of you is responsible for his flock. An Imam is a shepherd and he is responsible for those in his care. A man is a shepherd in respect of his family and is responsible for those in his care. The woman is a shepherd in respect of her husband's house and is responsible for those in her care. The servant is a shepherd in respect of his master's property and is responsible for what is in his care. All of you are shepherds and each of you is responsible for his flock.'" [Agreed upon]

301. The grandfather of 'Amr ibn Shu'ayb said, "The Messenger of Allah, may Allah bless him and grant him peace, said, 'Command your children to pray when they are seven. Beat them to make them do it when they are ten and separate them in their beds." [Abu Dawud]

302. Abu Thurayya Sabra ibn Ma'bad al-Juhani reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "Teach a child the prayer at the age of seven and beat him to make him do it when he is ten." [Abu Dawud and at-Tirmidhi]

Abu Dawud has, "Command a child to pray when he reaches the age of seven."