Valmiki Ramayana Ayodhya Kanda Sarga 21 Shloka 13
Original Shlokaगुरोरप्यवलिप्तस्य कार्याकार्यमजानतः। उत्पथं प्रतिपन्नस्य कार्यं भवति शासनम्।।2.21.13।।
1 source checked for this shloka
अवलिप्तस्य filled with haughtiness, कार्याकार्यम् acts good and bad, अजानतः of one who does not know, उत्पथम् unrighteous path, प्रतिपन्नस्य of one who has resorted to, गुरोरपि even of a preceptor, शासनम् discipline, कार्यम् duty, भवति becomes.
Even a preceptor who follows the unrighteous path and is filled with haughtiness and does not know how to discriminate between good and bad, deserves to be disciplined (punished).