This is a tricky question, but thankfully it's not one that too many interviewers will ask. Most will ask the question of "Who was your worst/best boss?" This question is a bit more specific, so it won't be asked as commonly as the other boss-related questions.
However, you need to be prepared, so it's essential that you know how to answer this question.
Why the question is asked
When an interviewer asks for your opinions on your boss, they don't actually care about how great or horrible a person your previous boss was. That's just the way of life, so they're not looking to see how great you were for putting up with a terrible person.
What they are looking for is how you will answer the question. If you answer positively, it proves that you can find the good in the bad, and learn from bad situations--something every interviewer looks for in an employee. If you slam your boss, however, no matter how bad he or she was, it will just make you look bad.
How to answer the question
Let me make this very clear: Every manager has strengths and weaknesses. No matter how great they were, they had something about them that made them bad. No matter how horrible they were, there was something to them that made them a great manager.
When answering this question, it doesn't matter how good or bad your boss is or was. The key is to answer in a way that you show what kind of person you are.
For example, let's say that your boss was a total micro-manager who had to be in control of every little detail of your work life. It drove you insane, and finally you quit your job because of that manager. Tough to spin that into a positive, right?
Wrong! Here's how you can answer the question:
"My former boss was very detail-oriented, to the point where he would step in and help me with every little project. While it found it bothersome, I eventually realised that it was a strength and began to learn from it. Since my attitude shift, I've discovered that I'm much more like him in my ability to focus on the small details that often slip through the cracks."
See, it's fairly easy! You answered the question honestly, but you spun it so that there's a positive twist to it. You made sure the interviewer understood that you found yourself in a tough situation, but then you managed to deal with your personal issues and overcome for the sake of the work. Even though the boss was tough to work with, you triumphed and made personal progress.
That's the kind of story the interviewer wants to hear, so think about what it was that made your previous boss a good or bad boss. Spin it in a way that you don't really talk about the boss' problems, but more about how you overcame your personal problems with the boss and are now a better employee because of it.