I believe it is alright to do with Grizzlies/Brown bears, but with Black bears, make yourself big (join hands upward with any companions) and make noise, whilstle, yell "I am not a moose!" and it'll keep 'em away. Don't leave food around your campsites, either!