This error usually occurs because OpenWindows exited abnormally, leaving the system's keyboard in the wrong mode. The characters that appear when someone attempts to login are garbage transliterations of what someone typed.
Find another machine and remote log in to this system
Run the following command:
$ /usr/openwin/bin/kbd_mode -a
kbd_mode is not a windows program; it fixes the console mode.
Log in remotely and start
kill the X server or reboot the system
The usual reason for this problem occurring is an automated script run from cron(1M) that clears the /tmp directory periodically. Ensure that any such scripts do not remove the /tmp/.X11-pipe or /tmp/.X11-unix directories, or any files in them.