A drive mechanism enables a socket-type wrench to rotate a shaft and prevents accidental rotation of the shaft when the wrench is not coupled to the shaft. In the original intended application, the shaft would be part of an attachment mechanism on a spacecraft, and the purpose to be served by the drive is to prevent back-driving of the shaft by launch vibrations while enabling an astronaut equipped with the appropriate wrench to actuate the shaft while in orbit. The design could also be adapted to terrestrial applications in which it is necessary to prevent rotational back-driving. The mechanism includes a gear near the tip of the shaft, and a drive nut that constitutes the tip of the shaft. The gear and drive nut are positioned in a recess in a housing. The recess is sized to receive the wrench socket that mates with the drive nut. Also contained in the housing are four linkages that include pins that are spring-loaded into engagement with the gear to prevent rotation of the shaft. When the wrench socket is inserted in the recess, it pushes on the linkages in such a manner as to disengage the pins from the gear.