You are not logged in.

#1 2013-01-12 22:09:57

From: Aurora, Colorado
Registered: 2004-09-10
Posts: 247

[SOLVED] Turning off echo in login prompt

Good Afternoon Arch Community!

Using Arch x64, pacman is all current. I do not use a display manager. That is my preference. So when I do launch a  D.E. (like Mate), I use startx.

I have had several instances where I rushed through the logins, and ended up typing in my password in plain text at the login prompt because the previous login attempt failed.

There are also health issues (I am older) that causes me to shake, so even when I go slower, the same issue sometimes comes up as exposing my password at the user prompt.

I am using the default bash.

I don't mind the last login information or anything like that.

What I want to do is have the cli login screens not echo anything at the login. In other words, I want the login field to not echo anything like the password field does not echo anything.

I've looked in login.defs, but nothing is jumping off the page at me other than how to turn off chatter such as last login, etc.

Can someone please steer me in the direction of how to do this please?

Thank you!

Sincerely and respectfully,


Last edited by dcbdbis (2013-01-12 23:04:07)


#2 2013-01-12 22:48:20

From: New York, USA
Registered: 2009-10-22
Posts: 4,111

Re: [SOLVED] Turning off echo in login prompt

Your username on the TTY is taken by agetty, not the login program (because login has to be invoked with a user name taken from somewhere).

The option you want doesn't currently exist in agetty, and I'm not familiar enough with alternative getty implementations to know if it exists elsewhere.


#3 2013-01-12 23:03:41

From: Aurora, Colorado
Registered: 2004-09-10
Posts: 247

Re: [SOLVED] Turning off echo in login prompt

Thank you. I took from the post that "agetty" handled tty logins which was not known to me.

So a "man'd" agetty and I agree on my end.... There is no such option.

Thank you for the response, and I learned one more item in the process. Thanks!



#4 2013-01-12 23:44:53

Inspector Parrot
Registered: 2011-11-29
Posts: 29,107

Re: [SOLVED] Turning off echo in login prompt

I've you're comfortable with a little code hacking this looks like it'd be very easy to implement.

I just downloaded the source (core/util-linux) from ABS.  It looks like the only change that would be needed would be on line 1244 of agetty.c to change `putchar(c);` to something like `putchar('*');` as an example.  Or remove lines 1243 and 1244 to have it echo nothing at all.

Note that this is completely untested and just came from a very quick look at the code.

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman


#5 2023-10-13 02:18:29

Registered: 2023-10-13
Posts: 1

Re: [SOLVED] Turning off echo in login prompt

Thannks Trilby i tried it, and learned how to modify repack install. its in the file login.c
search for the "Last Login" , printf exists just comment it.

if you want also to manipulate "incorrect username" or "incorrect password" they are all in same file

gee thanks


#6 2023-10-13 10:50:55

Forum Moderator
Registered: 2012-01-15
Posts: 4,590

Re: [SOLVED] Turning off echo in login prompt

AhmedMagdy, this thread is over ten years old and marked [SOLVED]. Please do not necrobump.


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.


Board footer

Powered by FluxBB