A school principal has been barred from entering school premises after he thrashed a Class VI student with an iron pipe in an inebriated condition.