How to set a code lock
Coded Door Lock: Mechanical and Electronic : How To Set A Code Lock
Quote from Article entitled Coded Door Lock: Mechanical and Electronic:
To change a codeword of lock cylinders by own forces there is no need to disassemble an entire device again. It uses a special tool which acts directly on the secret part of a lock and is gotten into a special slot in front of the door. During the changing a door should be open, and all latches necessarily put out until it stops. It is necessary to turn a key clockwise, and then insert a new key and hide inside latches with a new key. If the operation is successful, a lock will only respond to a new key or code. If there are doubts about the correctness of the action it is best to refer to a master who will explain how to handle with a lock properly.
The full version of the article can be found here.