Subject: Re: /etc/issue [& /etc/issue.net]
To: None <tech-userlevel@NetBSD.org>
From: Brian Ginsbach <ginsbach@cray.com>
List: tech-userlevel
Date: 07/22/2003 11:00:28
On Mon, Jul 21, 2003 at 04:10:58PM -0700, Greywolf wrote:
> Thus spake Matt Thomas ("MT> ") sometime Today...
>
> MT> I'm planning on adding support for /etc/issue (gettytab) &
> MT> /etc/issue.net (everything else) to NetBSD. These files contain
> MT> *uninterpreted* text to be written before issuing the login: prompt.
> MT> While gettytab(5) can provide that functionality now, inconvenient to
> MT> use (especially for scripts or programs).
> MT>
> MT> telnetd/rlogind/sshd will try to use /etc/issue.net, and if that is not
> MT> available they will try to use /etc/issue. In either situation, the
> MT> evalution of things in /etc/getttytab will remain unchanged.
>
> ...why uninterpreted?
>
> gettytab does not produce a full getty on network ports, at least not
> here. I must be missing something. It only produces
>
> login:
>
> ...and nothing else; if I'm not missing anything, I'd like to be able
> to print out a full OS/arch/tty disclosure on my network ports.
Works here:
irix> telnet nbsparc
Trying nnn.nnn.nnn.nnn...
Connected to nbsparc
Escape character is '^]'.
This is a private computer facility. Access for any reason
must be specifically authorized by Cray Inc. Unless you are
so authorized, your continued access and any other use may
expose you to criminal and/or civil proceedings.
NetBSD/sparc (nbsparc.cray.com) (ttyp1)
login:
...
nbsparc> uname -r
1.6
From /etc/gettytab:
default:\
:ce:ck:np:im=\r\n%s/%m (%h) (%t)\r\n\r\n:sp#9600:if=/etc/issue:
The problem is, at least with telnet, if the USER environment
variable is set (passed by the remote) you will not see either the
gettytab `if' or `im'. The USER environment variable is passed
when telnet attempts autologin. This is the default for NetBSD
telnet since it is built with #define AUTHENTICATION (Kerberos
etc.).
From telnet/main.c: (added at rev 1.15 to fix PR 12226)
if (autologin == -1) { /* esc@magic.fi; force */
#if defined(AUTHENTICATION)
autologin = 1;
#endif
>
> That said, I do kind of miss /etc/issue.
>
>
>
> --*greywolf;
--
Brian Ginsbach Cray Inc.