The armourer
In Dr. No, the character isn't called Q yet. He's Major Boothroyd, the service armourer, played by Peter Burton in a single scene. On M's orders, he takes away Bond's Beretta and hands him the Walther PPK, which becomes the agent's gun for decades.