It's not uncommon to forget your Raspberry Pi password, and there are a number of ways to recover your system.
Below is a larger example of how this feature can be used in production environments. The table passwd emulates a Unix password file: -- Simple passwd-file based example CREATE TABLE passwd ( ...