All forms of loshon hara are prohibited even when no names are mentioned, if it will be possible for people to determine who is being discussed.
If names are omitted but the story will reflect badly on an entire group of people, it may not be spoken. Speaking critically about an unnamed student at a yeshivah is often taken as a statement about the entire student body or as a reflection on yeshivah students in general. If this is the implication, the statement is a more serious form of loshon hara, for it reflects on a multitude of Jews.
Sefer Chofetz Chaim, 30 Tishrei, page 108