You are not logged in.

#1 2009-12-19 03:56:44

exiquio
Member
From: Santa Fe, NM, United States
Registered: 2009-10-20
Posts: 32

Modifying Login Prompt

I am attempting to do a few things to "harden" my Arch Linux machines. I have managed to change the both the message of the day and the message displayed at the login prompt by editing their respective files (/etc/motd and /etc/issue), but for the life of me I can not figure out a way to alter the login prompt's string from what it currently defaults to (machine's hostname) without changing the hostname of my machine. Do any of you good people know a way that I can do this without changing my host name?

PS
I am posting in the Protection section because I am trying to protect through obscurity.

Last edited by exiquio (2009-12-19 03:57:26)


"Unix is simple. It just takes a genius to understand its simplicity." – Dennis Ritchie

Offline

#2 2009-12-19 06:51:46

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: Modifying Login Prompt

Changing /etc/motd, /etc/issue and your terminal prompt will not harden your machine. But at any rate you can change your terminal prompt quite easily: http://wiki.archlinux.org/index.php/Color_Bash_Prompt , for starters, see the other links at the bottom of that wiki post also.


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#3 2009-12-19 18:59:45

exiquio
Member
From: Santa Fe, NM, United States
Registered: 2009-10-20
Posts: 32

Re: Modifying Login Prompt

Obscuring any clues to how one accesses his or her system is hardening. It isn't much but it goes a long way when added to other methods. The default issue message tells an attacker exactly what system I am running. That is quite a big clue. Foolish people like me have hostnames that mean something to them. That is another clue. Obscuring any possible aids to a potential attacker is definitely a part of security.

I must not have made my question clear. I am not asking how to change my bash prompt. Once someone is there they are already in my system. I am asking how to change the login prompt (eg., "hostname login:"). Unless I missed something (which I am known to do), my question has not been answered. Thanks for the suggestion though. And if I did miss something please forgive me.


"Unix is simple. It just takes a genius to understand its simplicity." – Dennis Ritchie

Offline

#4 2009-12-19 20:05:04

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Modifying Login Prompt

You could patch agetty (util-linux-ng) to make it show only

A:\>

instead of "hostname login:" and replace the "Password:" and "Login incorrect" with something silly like "Disk not ready (abort/retry/fail)".

edit: Actually it seems to be /bin/login that prints "hostname login:" and "Login incorrect", not sure about "password:". There is a file in util-linux-ng called login.c that has these strings too, but don't seem to get added to any binary.

Last edited by Procyon (2009-12-19 20:42:49)

Offline

#5 2009-12-19 20:06:41

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: Modifying Login Prompt

bah nm

Last edited by Gen2ly (2009-12-19 20:07:11)


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

Board footer

Powered by FluxBB