You are not logged in.

#1 2013-06-01 02:12:03

squiidux
Member
Registered: 2013-06-01
Posts: 19

[SOLVED] Issue with mingetty and /bin/login -f

I have change the /etc/systemd/system/getty.target.wants/getty@tty1.service to use mingetty to  suppress the displaying of the hostname when prompted to login to the TTY. in an effort to harden the system and not give the hostname:

when an incorrect or bad login happens, the "Login Incorrect" text is displayed and you are re-prompted to login in. HOWEVER, this time the hostname is present. doesnt anyone know where this second call to '{a,min}getty'is coming from?

Last edited by squiidux (2013-06-01 12:10:35)

Offline

#2 2013-06-01 02:33:10

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED] Issue with mingetty and /bin/login -f

That isn't a getty, that's /bin/login


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2013-06-01 10:28:52

squiidux
Member
Registered: 2013-06-01
Posts: 19

Re: [SOLVED] Issue with mingetty and /bin/login -f

what is calling it then?

Offline

#4 2013-06-01 10:52:14

squiidux
Member
Registered: 2013-06-01
Posts: 19

Re: [SOLVED] Issue with mingetty and /bin/login -f

also semper fi

Offline

#5 2013-06-01 11:00:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED] Issue with mingetty and /bin/login -f

What's what called?  I'm pretty sure /bin/login is the program that displays the host name.  I've never tried to inhibit this, but from the man pages there seem to be two options that may do so.  agetty, and likely mingetty too, has the -H flag which should be able to set a false host name - perhaps even an empty string.

If it is only an issue after a failed login, /bin/login has an -f flag which should inhibit a second login attempt after a failed attempt.  Though the man page says it doesn't work well.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2013-06-01 11:05:55

squiidux
Member
Registered: 2013-06-01
Posts: 19

Re: [SOLVED] Issue with mingetty and /bin/login -f

i guess my question now is, where can i find out what is calling /bin/login . if i can find that im sure i can fix it, i just dont know what is calling it after a failed login attempt...

Offline

#7 2013-06-01 11:10:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED] Issue with mingetty and /bin/login -f

getty calls login.

0) kernel starts init
1) init (in this case systemd) calls a getty (agetty/mingetty)
2) gettys call a login program, the default is /bin/login, but this is easily changed in the getty
3a) the login program calls your login shell which is defined in /etc/passwd, but should only be changed with programs like usermod
3b) if the login fails, /bin/login restarts itself unless it was passed the -f flag

Step by step, easy enough for even a jarhead wink

Again, I've never done this myself, but I suspect you may want to look into alternate login programs.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2013-06-01 12:10:04

squiidux
Member
Registered: 2013-06-01
Posts: 19

Re: [SOLVED] Issue with mingetty and /bin/login -f

thanks brother.
and /bin/login -f USERNAME
hangs my system so.... on to find another login program. I'm sure i will see you about here again. thanks again!

Offline

Board footer

Powered by FluxBB