For me, it was "hit and miss" to find a good position; move the barre up and down and find a good spot (in a perpendicular fashion, not along the neck).
I know justin gives the tip of curling the barring finger out a bit and this can help, certainly in the beginning but most of all, you need to find your own best finger position. Including the amount of "roll".
For me, only a very very gentle roll is allowed or I go buzzing.
For every grip, the applied pressure for each finger is different. It sounds boring but practice makes perfect.
Thry it on other frets and see what it does where. Trying it on various places will buzz but you'll get a feel of what goes smooth and what not.
also, try sliding the same shape 1 fret up/down, frets up/down and you'll get to know the feeling even better.
A very good exercise is changing from open chords to barre chords in a progression. If it doesn't work immedialty, it can be a bit frustrating but it's normal, it's a bit hard when starting out with barres.