A 12 ga shotgun loaded with the appropriate ammunition is a proven close range defender from dangerous wildlife. Occasionally I still do bear security work, and our clients, particularly on work sites, spread themselves over a wide area. In this scenario there is no substitute for a powerful rifle. Likewise, should a family member be 150 yards distant when they are unexpectedly confronted by a dangerous bear, if you've chosen a shotgun as your primary defensive arm, you have ensured you will be an observer rather than a participant ito what happens next.
While I enjoy shooting big rifles, they aren't for everyone. A .30/06 you can hit with trumps a .458 that you haven't mastered. I made up a bear gun for my wife, based on a Husqvarna 1600 21" carbine with the LOP cut to 12" with the Decelerator recoil pad, and mounted an XS ghost ring rear sight with a rectangular post front. She is able to shoot this rifle quickly, hits well, and isn't disturbed by the recoil. Hot loaded 180 gr TSXs ensure deep penetration, which is what you want facing the pointy end of a dangerous bear. While dangerous bear encounters can and do occur with large male bears, we've found that sub adults are frequently a bigger problem, so a high velocity big bore rifle, or even a hot loaded .45/70 might not be necessary. Regardless of which gun you choose, in any defensive scenario, competence is essential, and competence must be developed over time with frequent practice, not only in marksmanship, but in gun handling, loading, and manipulation of the action. You benefit by having all family members become competent, and due to the reduced recoil and blast of rifle cartridges with modest powder capacities, the rifle will be quicker to master than a 12 ga.
All that said, a 12 ga shotgun is a viable defensive tool, and if that's what you prefer to carry, you are far from being unarmed . . . providing you are competent with it. Frequently I carry a 12 ga, particularly when I'm near town or even when I just jump into the truck to go for a ride. I like the Brenneke 3" 600 gr slug loads, and I keep a few Federal Premium 3" 00 Buck 12 pellet loads in the sidesaddle should the potential overpenetration of a slug be inappropriate. I won't use less lethal ammunition like cracker shells or rubber bullets in the same gun I load with lethal ammo. Around here this is a minority opinion though, but I suggest the magazine be loaded with lethal ammunition and the less lethal rounds be single loaded as required. Just keep in mind that if the slide of the shotgun is fully retracted, a lethal round is now on the elevator, and be aware that less lethal rounds can be corrosive, and can leave partial bore obstructions in the barrel.