This question on Aviation SE asks whether pilots in the US have to hold a driver's license (they don't). In a comment the poster explained why they asked the question:
The reason and details cannot be publicly disclosed, but I am an ex A.W.O.L. soldier from the U.S. Marines. A court marshal [sic] ordered that I can't ever obtain a driver's license.
I know nothing about law or courts martial, but that seems to imply that a military court can impose a lifetime driving ban on someone. Which, once the poster is discharged and becomes a civilian, would presumably require individual states to uphold and enforce the military ruling.
So, could a court martial actually impose that penalty? Can court martial sentences 'carry over' into civilian life and be enforced there? More broadly, what penalties can they impose, beyond imprisonment or the death penalty?