[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: issue, motd, or what?





> Where is all this config hiding?

No, no, Erich had it right. For modem connections, getty (or mgetty or
uugetty or whatever) issues the first "login" prompt, and then the
password prompt and all subsequent login/password prompts are issued by 
/bin/login.

That first "getty" login prompt syntax is defined by /etc/gettydefs, like
so:

F38400# B38400 CS8 CRTSCTS # B38400 SANE -ISTRIP HUPCL #@S login: #F38400

The stuff before "login" is defined as follows:

              @B    The current (evaluated at the time the @B is seen) bps rate.
              @D    The current date, in MM/DD/YY.
              @L    The serial line to which getty is attached.
              @S    The system name.
              @T    The current time, in HH:MM:SS (24-hour).
              @U    The number of currently signed-on users.  This is  a
                    count of the number of entries in the /etc/utmp file
                    that have a non-null ut_name field.
              @V    The value of VERSION, as given in the defaults file.
              To display a single '@' character, use either '\@' or '@@'.

Now, for a network login (e.g., telnet), /bin/login handles all the
prompts, even the first "login". If you want a customized prompt, you'll
need to edit login's source. Specifically, this line:

	printf("\n%s login: ", thishost); fflush(stdout);

Remember:

dial-up  =  getty 1st prompt, /bin/login 2nd and all subsequent

telnet   =  /bin/login all prompts


-J


--
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.