I'm using GNU readline in C to input a username and password from the user. How can I disable echo so the password doesn't appear on the screen?
There are examples around the net of using readline in Perl and setting the ReadMode to "noecho", but I have not seen a C example of that.
I looked into using getpass()
, but the manual page has this warning:
This function is obsolete. Do not use it.
It comes with no further information about what we should use instead.