Standing up when a teacher enters: The apparent meaning of authentic hadiths indicates its dislike or prohibition. For example, the hadith of Anas (may Allah be pleased with him) who said: “There was no one more beloved to them (the Companions) than the Messenger of Allah (peace be upon him), yet they would not stand up when they saw him because they knew of his dislike for that.” This was narrated by Ahmad and al-Tirmidhi, who said it is Hasan Sahih Gharib.
It is not appropriate for the teacher to be pleased with the students doing this, due to the hadith of Mu’awiyah (may Allah be pleased with him) that the Prophet (peace be upon him) said: “Whoever likes for men to stand up for him, let him take his place in Hellfire.” This was narrated by Ahmad, Abu Dawood, and al-Tirmidhi with a good chain of narration, and al-Tirmidhi graded it as Hasan. Abu Dawood also narrated with a weak chain from Abu Umamah (may Allah be pleased with him) who said: “The Messenger of Allah (peace be upon him) came out to us leaning on a stick, and we stood up for him. He said: ‘Do not stand up as the non-Arabs do, glorifying one another.’” This was also narrated by Ahmad and Ibn Majah. These hadiths were mentioned by al-Hafiz Muhammad ibn Muflih in “Al-Adab al-Shar’iyyah” (vol. 1, pp. 464-465).
Some scholars have exempted from these hadiths standing up for someone arriving from a journey to greet and shake hands or embrace them, as well as for someone who has been absent for a long time. Some also exempted a child standing up for their parent to honor them and take their hand, and a parent standing up for their child if they are deserving of that. The intention here is standing up for greeting and shaking hands. This exemption is correct and is supported by authentic Sunnah. Among the evidence is what is in the two Sahihs that the Prophet (peace be upon him) said to the Companions when Sa’d ibn Mu’adh came to judge Banu Qurayza: “Stand up for your chief,” meaning to greet him and help him dismount. Also in the two Sahihs, when Ka’b ibn Malik entered the mosque and the people were around the Prophet (peace be upon him) after Allah accepted his repentance, Talhah ibn Ubaydullah stood up hurriedly, shook his hand, and congratulated him on Allah’s acceptance of his repentance. The Prophet (peace be upon him) did not disapprove of this. Abu Dawood, al-Tirmidhi, and al-Nasa’i narrated with a good chain from Aisha (may Allah be pleased with her) who said: “Whenever Fatimah (may Allah be pleased with her) entered upon the Prophet (peace be upon him), he would stand up for her, take her hand, kiss her, and seat her in his place. When he entered upon her, she would stand up for him, take his hand, kiss him, and seat him in her place.” These hadiths clearly indicate the permissibility of such actions and that they do not fall under the disliked standing.
As for what some people do today of standing up for the teacher or others every time they enter, to honor them, not for greeting or the like, but just standing and then sitting down to show respect, there is no doubt about the dislike and disapproval of this. It is not permissible for the teacher or others to be pleased with this, as mentioned in the hadith of Mu’awiyah and others. Those most deserving of adhering to the Sunnah and its etiquettes are the scholars, teachers, students of knowledge, and leaders, because people follow their example. If they honor the Sunnah, people will honor it, and if they neglect it, people will neglect it. Our Prophet (peace be upon him) is the best of people, the most virtuous, and the leader of the children of Adam (peace be upon him), yet he did not approve of people standing up for him. Rather, he disliked it and forbade the Companions from doing so, fearing for them from exaggeration and resembling the non-Arabs in standing up for their leaders and dignitaries. Allah, the Exalted, says: “Indeed in the Messenger of Allah you have an excellent example for whoever has hope in Allah and the Last Day and remembers Allah often” [Al-Ahzab: 21]. May Allah grant us and you beneficial knowledge, acting upon it, and calling to it.