I'm not a teacher, but I would understand "barred By" to refer to the person or agency that did the barring. "Barred from" I would understand to refer to the activity or location from which the subject was barred.
"The teacher barred him from entering the library in his dirty shoes." This could be written as: "He was barred from entering the library in his dirty shoes. He was barred by the teacher."