In DragonFable, the password prompt you are thinking of belongs to a mini-game tied to the character Twilly. To reach it, talk to Twilly and choose the game and prizes options.
Once there, entering the correct code unlocks the reward. These in-game codes are meant to be discovered through play, so exploring dialogue options is the most reliable way to find them.