I moved into a house with a barn. The barn has a 100 Amp panel. It feeds from a Main Entry 100A breaker in the Entry's box. There are 3 wires to the sub. Ground and 2 hot. The subpanel in the barn has 100 amp main breaker. There are two grounding bars in the sub that are connected. Am I hearing right? That the white and grounds cannot be connected to the same bar?
We really need to know if the connection is made via metal conduit, particularly Rigid (pipe threaded) metal conduit. The metal conduit is the ground wire, meaning the white neutral wire is not the ground wire.
Any wire which ordinarily handles return current from a hot, is a neutral. Neutral is not ground. Wires which only handle current during electrical failures are safety grounds.
The idea of hooking up an outbuilding without a ground was outlawed some time ago, and for good reason. For awhile, Code allowed a toxic hybrid: "just combine neutral and ground". "After all, they go to the same place in the main panel, right?" But it's a terrible idea that actually makes things worse. If you had no grounds at all, a broken neutral just broke your power. With neutral bootlegged to ground, a broken neutral floats all your grounds to 120V, making things which are supposed to be safe, lethal!
Applying a ground rod is no cure either. Dirt is a poor conductor (which is why we bother digging up copper) and the dirt between shed and house doesn't have the capacity to return large amounts of current like you have in an electrical short. You end up just electrifying the soil as well!
Reminds me of a story about a woman whose phone ringer didn't work. "But I know when someone calls, because the dog yelps". Hooboy.
If you have separate neutral and ground
-- then as Someone says above, you need to have separate neutral and ground buses. Since outbuildings need a main shutoff, people usually use "main panel" type panels and use the "main breaker" as the shutoff. These are intended to be main panels, which don't need separate neutral and ground buses, so this is often omitted. Either they sell separate accessory ground buses, or they let you split a dual netural bus into a neutral bus and a ground bus.
Since many "electricians" mostly fling Romex into new houses or do repairs, they often don't understand the finer points of subpanels. So it's common to see electricians wiring subpanels like main panels, glomming neutrals and grounds onto the same bus. Either grounding wasn't taught when they went to trade school, or they got so habituated to working in 1-panel homes that they forgot. Either way, it's the kind of error that doesn't fail right away.
If you have neutral only
Then you are bootlegging ground, with the risks therein.
You can fix that by retrofitting a ground wire and separate your neutrals and grounds. The ground wire does not need to follow the same route as the conductors. If the conductors are in conduit, you can add the wire. Otherwise you can direct bury a bare copper wire of appropriate size.
Alternately, you can render that safe by putting the entire shed on a GFCI breaker (this being a 2-pole breaker if the shed has 240V). In this case you must separate neutrals from grounds or it'll defeat the purpose! Now, if something bites you, it is returning not through the neutral wire, and the GFCI will detect this and trip.
Another option is convert the circuit to 120V-only. The wire colors may (or may not) be the right colors for this to be legal. In this case, one wire becomes ground, one becomes neutral and the other becomes 120V hot. This is often good enough for people who aren't doing heavy work.
If the supply to your subpanel has no ground wire, it has a combined protective earth & neutral conductor. Your earth and neutral bars must be bonded together.
If the supply to your subpanel has separate earth and neutral wires, then you need to separate the earth and neutral cables onto separate bars, and not connect the bars together.
Code may require that you have a separate earth conductor in certain circumstances, even if it's a separate building.