Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Re: /etc/issue
@ 1995-03-05 16:47 Matthew Harrell
  0 siblings, 0 replies; 5+ messages in thread
From: Matthew Harrell @ 1995-03-05 16:47 UTC (permalink / raw)


: On OSF/1, at least for the console, this is an issue of getty :-)
: See gettydefs(4) for the definition of the login prompt on the console.

: If you log in via rsh or rlogin, you don't get a login banner at all.
: (just "login:" and "Password:" - if the client is not in the .rhosts
: mechanism)

: That is, your quoted line above is hard wired in telnetd.
: I haven't looked into it further.  Maybe you can manipulate /etc/gettydefs
: to force telnetd to give another banner.  Note that telnetd does seem to
: NOT call getty but instead interprete gettydefs itself.
: See getty(8), login(1) etc.


If you want to display a file during a telnet login, the following file
can help:



#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

#define ISSUE           "/etc/issue"

#ifdef __linux__
#  define TELNETD       "/usr/sbin/in.telnetd"
#elif defined (OSF1)
#  define TELNETD       "/usr/sbin/in.telnetd"
#endif

void main ( int argc, char **argv )
{
  FILE *Input;                          /* Issue file */
  char Buff;                            /* Character buffer */

  if ( (FILE *) NULL == ( Input = fopen ( ISSUE, "r" ) ) ) {
    fprintf ( stderr, "%s:  Unable to open %s\n", argv [0], ISSUE );
    exit ( 1 );
  }

  while ( fread ( &Buff, sizeof ( char ), 1, Input ) ) {
    if ( Buff != 0x0a )
      putchar ( Buff );

    else {
      putchar ( Buff );
      putchar ( 0x0d );
    }
  }

  fclose ( Input );

  if ( !fork () )
    execv ( TELNETD, argv );

  exit ( 0 );
}



Just change the definition of ISSUE to whatever you want to display,
compile, and change /etc/inetd.conf to reflect the new program to
use.  For example, I typically stick this program in /usr/sbin/tcpd-telnet
and then change the telnet line in /etc/inetd.conf to 

telnet  stream  tcp     nowait  root	/usr/sbin/tcpd-telnet   telnetd

This way, tcpd-telnet gets run first, outputs the issue message, then execs
telnetd.

--
        /-------------------\              Phonenet address:
       /  Matthew Harrell      \             202.767.4085
      /   Naval Research Lab     \ 
      /   Code 7640                \       Internet address:
       \  Washington, DC   ___==== /         harrell@uap.nrl.navy.mil
        |--------------------\               
        |====================/             Friends don't let friends do DOS.


^ permalink raw reply	[flat|nested] 5+ messages in thread
* /etc/issue
@ 1995-02-20 22:01 AFSAR
  1995-02-21  9:02 ` /etc/issue Michael Sternberg
  1995-02-22 14:11 ` /etc/issue Todd S. Aven
  0 siblings, 2 replies; 5+ messages in thread
From: AFSAR @ 1995-02-20 22:01 UTC (permalink / raw)


I have got an Alpha 2100. I was wondering if anybody knows what is the 
file name for login in anoncement. I am not talking about  "/etc/motd" what I 
am looking for is when you log in to system you get this message that says:

OSF/1 (your host name) (#ttyp2)

Login: xyz
Password:

The file name for this kind of annoncements are found on Cray and Convex 
systems in /etc/issue and I want to know what is file name in OSF1 systems.
Please let me know of this file.  Thanks much.

afsar@jaguar.litc.lockheed.com


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1995-03-05 16:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-03-05 16:47 /etc/issue Matthew Harrell
  -- strict thread matches above, loose matches on Subject: below --
1995-02-20 22:01 /etc/issue AFSAR
1995-02-21  9:02 ` /etc/issue Michael Sternberg
1995-02-22 14:11 ` /etc/issue Todd S. Aven
1995-02-22 15:27   ` /etc/issue Wuxu Peng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox