I booted from the OS X CD and repaired the disk (and it found two files with illegal names) and repaired permissions. I also used the Reset Password utility to change the password. However, that didn't change anything. I also tried booting in single user mode to use passwd, but that didn't do anything at all (it didn't even ask me for a new password; it just exited).
However, another hint noted that if the master password is set (via the Security System Preferences panel), you can reset a password through the login screen by entering bad passwords a few times. After a few bad login attempts, OS X asked me for the master password, which I did know and it did accept. It then asked me for a new password, and then warned me that I'd get a new default keychain. I think this last part was an important aspect of what went wrong.
I then logged in, and everything worked again. However, I my old keychain was still in existence and working.

