user567: Either school teacher or Buddhist teacher in monastery, if they would punish their students is also supposed bad karma even if it cause of bad behavior of students? 

user11009: It depends on how you punish. Buddha also punished.
=============
"If a tamable person doesn't submit either to a mild training or to a harsh training or to a mild & harsh training, then I kill him, Kesi."
https://www.accesstoinsight.org/tipitaka/an/an04/an04.111.than.html

user8157: Buddha did not do any violence. The suttas say:

it is true, Kesi, that it's not proper for a Tathagata to take life. But if a tamable person doesn't submit either to a mild training or to a harsh training or to a mild & harsh training, then the Tathagata doesn't regard him as being worth speaking to or admonishing. 


567: <p>Either school teacher or Buddhist teacher in monastery, if they would punish their students is also supposed bad karma even if it cause of bad behavior of students? </p>
 11009: <p>It depends on how you punish. Buddha also punished.</p>

<p>=============</p>

<p>"If a tamable person doesn't submit either to a mild training or to a harsh training or to a mild &amp; harsh training, then I kill him, Kesi."</p>

<p><a href="https://www.accesstoinsight.org/tipitaka/an/an04/an04.111.than.html" rel="nofollow noreferrer">https://www.accesstoinsight.org/tipitaka/an/an04/an04.111.than.html</a></p>
 8157: <p>Buddha did not do any violence. The suttas say:</p>

<blockquote>
  <p>it is true, Kesi, that it's not proper for a Tathagata to take life. But if a tamable person doesn't submit either to a mild training or to a harsh training or to a mild &amp; harsh training, then the Tathagata doesn't regard him as being worth speaking to or admonishing. </p>
</blockquote>
