Hi
Very intersting, but not sure how to do it.
This is some kind of low-level change which might make your system not able to boot =>
first ensure that you have an alternative way of booting your PC (e.g. using a cd-rom)
In my case (Gentoo Linux without graphical login), the login is controlled by the configuration found in "/etc/inittab:
Code:
# TERMINALS
c1:12345:respawn:/sbin/agetty --noclear 38400 tty1 linux
c2:2345:respawn:/sbin/agetty --noclear 38400 tty2 linux
c3:2345:respawn:/sbin/agetty --noclear 38400 tty3 linux
c4:2345:respawn:/sbin/agetty --noclear 38400 tty4 linux
c5:2345:respawn:/sbin/agetty --noclear 38400 tty5 linux
c6:2345:respawn:/sbin/agetty --noclear 38400 tty6 linux
Maybe you could substitute the text saying e.g. "/sbin/agetty --noclear 38400 ttyXXX linux" with your own script "/my/own/scriptXXX.sh" and in "scriptXXX.sh" write something like...
Code:
/sbin/agetty --noclear 38400 ttyXXX linux || echo somefailedlogin_on_XXX >> /tmp/nosypeople.txt
...which would execute the same exact original command but additionally run the "echo" command (for testing purposes - once you have that working you can run anything) only in case of a failure.
Again: if you screw up with "inittab" you'll definitely end up not being able to login at all => ensure that you have a way to modify that file without relying on your HDD (e.g. booting from cd-rom + mounting your root partition + edit that file).
Have fun