A cable lock includes a cable, a shackle pin connected to one end of the cable, and a lock body connected to another end of the cable. The lock body includes a channel for the shackle pin, at least one lock member adjacent the channel pivotable from an open position disengaged from the shackle pin to a closed position engaging the shackle pin, and a retainer associated with a lock member driven from a released position disengaged from the lock member to an engaged position retaining the lock member in the closed position.