From john walshe on Tue, 09 Mar 1999
I am wondering how you would get the * to come up on a screen for each character pressed when someone is entering a login password on a unix platform.
As your subject suggests, you'd have to modify the sources to the 'login' program. You'd have to put the terminal in a particular mode so you're getting each character (rather than getting whole lines at a time). This is possible on any terminal through which one can run 'vi' 'emacs' or any other full screen text program. However, the existing 'login' programs, and your shell, and the 'ex' (or 'ed') line editors don't require this --- so they can still be used with teletype devices.
I suspect that this is at least one reason why the login program doesn't provide visual cues for each character you type. Another is that it would reveal the length of your password to any shoulder surfers in your vicinity any time you logged in.
I was amused that the Lotus Notes login dialog (under Windows) would spit out a random number of *'s for every keystroke you entered in the password field of the dialog. So you knew that the keyboard was responding --- but couldn't tell if you'd "bounced" some keys. That doesn't seem like much of a "solution."
In any event --- feel free to play with it. Understand that 'login' is a security sensitive program. The slightest mistake you make there can probably be exploited to take over your whole system. So, I wouldn't deploy this on exposed servers unless you are very sure of your programming skills (or very foolhardy --- as the case would more likely be).