"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
LinuxCare, http://www.linuxcare.com/


(?) Seeing Stars During Login

Re: login source code

From john walshe on Tue, 09 Mar 1999

Hi Jim,

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.

Thanks, John.

(!) 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).


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 39 April 1999


[ Answer Guy Index ] 2 3 4 5 6 7 8 9 10 11
12 13 15 16 18 19 21 22 23


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]