I've no idea where Fred comes off with "You can't" and "whole computer" and "4 to 5 times the price." A standard keylock featuring a keypad built into a standard door lock hardware frame runs about $100 (low end) to about $250 (high end.) An example of one at $119 is in the 1st link below. That commercial product, multiplied by 4 or 5 according to Fred, would set your max budget to beat what he is saying. Frankly, if you can't come in a LOT LESS than that, then you shouldn't be bothering to try at all.
You can buy (over ebay) a keypad for about $1 and for ones with actual plungers in the keys are about $4 or so. A complete 32-bit microcontroller with ¼ megabyte of flash and 48 kbyte and a lot of extras (like a 3D accelerometer, 3D gyro, and compass) is a mere $11 from Digikey. (STM32F3DISCOVERY) See 2nd link below. Price is $10.90 in ones. But you could get by with an under $2 microcontroller for this work, frankly. You just need an internal EEPROM in one and at under $2 there are a lot of choices.
The main problems are all mechanical stuff related to installation and the solenoid used to unlock the door.
I'm actually in the process of developing a 220VAC (both phases of a single phase household system) lock that uses 40kHz ultrasound to ensure that the operator of a home stove system doesn't leave the area when it is on. It will have a full keypad, display, locking codes, the ability to change them of course, two 40kHz sensor system (they are about $3 each from ebay) for full angular coverage of the area, a keypad system, and both an SSR (solid state relay that I will operate at 0° phase angle) and a regular power relay which will do the heavy lifting afterwards. (The SSR will act to protect the relay contacts, but because it dissipates power will not be the active unit while the stove is operating thereby allowing me to use a much lower powered [cheaper] SSR circuit.)
It's all really a piece of cake.
Just do it.
As far as being able to change passwords, almost EVERY micro out there either includes internal EEPROM, which is a decent place to store such changed codes, or else can support any number of the external serial EEPROMs that exist (and cost NOTHING to speak of.)