Logins & /etc/issue

The default login text on most distros I've seen leave a lot to be desired. But it's easy to modify, and can do more than you might think.

The worst thing about a simple login prompt is that it doesn't clear the screen. So tty1 still shows all the login messages, and whenever you log out of any terminal, it still shows a screenfull of what you were doing before logging out - not terribly secure.

This is, however, very easy to sort out. Type "clear" at the terminal. Your screen will be cleared. If you log out now, you don't leave a screenful of data on display. Better, but not much. So now, run "clear > clear.txt"

Nothing happens, right? This is because the "clear screen" request has been sent to the file "clear.txt". So if you now type "cat clear.txt", the "clear screen" request gets sent the the terminal, and now the screen clears. If you look in a text editor at the file contents, you'll see a collection of characters with no meaning to you - but it's meaningful to the terminal, and that's what matters.

So, we want to get this into the login screen itself. That's simple: the login screen is defined in the file /etc/issue

Open it up (as root) in a text editor. Then as the top line, add the contents of the clear.txt file. Save it, and you're done.

From now on, every time you see the login screen, it should be at the top of a nice, clear screen.

Creative Commons License

Unless otherwise stated, all articles/files on this website are licensed under a Creative Commons License. This page's URL must be supplied in attribution.
Valid HTML 4.01 Transitional