To provide a practicable lock system having an unlocking setting which is high in unlocking-difficulty level and can be freely, easily and repeatedly changed.
The grooved gears 5 each having a groove 25 for accommodating an inner end part 24 of an opening/closing bar 16 are stacked and installed on a shaft, and racks 18 capable of being individually engaged/disengaged with/from the gears are stacked in the same way. A drive gear to be sequentially engaged with the stacked grooved gears 5 to turn the gears 5 and a fixed gear 7 for restraining the grooved gears 5 engaged before from turning when the drive gear 6 is moved in the axial direction are provided. A space for allowing idle rotation of the drive gear 6 without engagement with any of the grooved gears 5 is provided on one side of the grooved gear 5, and a drive rack 12, a cam device or the like for driving the opening/closing bar 16 is provided on the other side. By employing the structure as described above, the racks 18 are engaged with the gears 5 after the grooves 5 of the grooved gears 5 are arbitrarily selected individually in sequence by disengaging the grooved gears 5 from the racks 18. Thus, unlocking setting work is completed. For unlocking, the drive gear 6 is sequentially turned and fixed to align all the grooves 26 to the position allowing insertion of the inner end part 24 of the opening/closing bar 16.