The official SmartThings lock integration does not have management of individual user lock codes. Fortunately, several community members have created custom smartapps which can give you very advanced lock management.
Most community members are happy to share their custom code for free with other SmartThings users. There are a few who do charge a license fee. In the case of locks, both Lock Manager by Erik Thayer (totally free) and RBoy’s lock offering ( behind a paywall) are very popular. You just have to look at the various features and decide what’s best for you.
Normally the smartapp will also have an author thread in this forum where you can ask questions or even make suggestions for additional features to any individual smartapp.
Using custom code is pretty straightforward. Basically you will copy the author’s code and paste it into your own account. Here is the FAQ on that process (this is a clickable link)
The challenge for many people is in finding the custom code to begin with! So to help, there are quick browse lists in the community – created wiki which list both smartapps and device type handlers by type, and that’s usually the fastest way to find stuff. For example, in this case you would just look on the smartapp list for locks. (Usually community members write something for themselves first, and then share it, so the features do vary. )
There is also a section in the quick browse lists for project reports with lists on everything from pets to holiday projects. Those can also be helpful. And there is a “get started” list in the project reports section for those who are new to SmartThings which is also worth taking a look at. It includes topics like “the top 10 things to do with SmartThings” and “what device should I get next?”
Finally, there is a very powerful community – created rules engine, webcore, which is essentially a (free) scripting language for SmartThings and lets you do almost anything. If you have a strong technical background it’s worth looking at, and there are many community members who will be glad to help you if you get stuck on anything.
But when it just comes to lock codes, most people use one of the smartapps already mentioned rather than trying to write their own from scratch.