Subject: Re: login prompt, console...
To: Andrei Zaitsau <>
From: Caffeinate The World <>
List: netbsd-users
Date: 03/15/2001 21:02:53
--- Andrei Zaitsau <> wrote:
> Hello everyone !
> 1) Can anyone tell me what shall I change to restrict remote logins?
> Like
> allowing only direct access via console?

you can edit out what ever services you want (i.e. telnet, etc) from


maybe you can go further by using ipf to filter other things out that
you don't want.

> 2) How can I restrict number of terminals per computer? For example I
> want
> to have only ttyE1 & ttyE2?

this one i don't know. perhaps 'man ttys' maybe be a source of help.
> 3) How would I hide OS information on terminal screen when you reach
> login
> prompt?
> For example NetBSD/i386 (VORTEX2001) (ttyE2)
> login:
>  but I want to see:
> This Machine Is for Testing Only:
> login:
> How would I change that?

in /etc/gettytab

        :ce:ck:np:im=\r\n%s/%m (%h) (%t)\r\n\r\n:sp#9600:

man gettytab will give you everything. in short, you can change the
params above %{letter}. here is a short review of what they mean:

%d  The current date.
%h  The hostname of the machine, which is normally obtained from the
   system using gethostname(3), but may also be overridden by the hn
   table entry.  In either case it may be edited with the he string.
   A '@' in the he string causes one character from the real hostname
   to be copied to the final hostname.  A '#' in the he string causes
   the next character of the real hostname to be skipped.  Each char-
   acter that is neither '@' nor '#' is copied into the final host-
   name.  Surplus '@' and '#' characters are ignored.
%t    The tty name.
%m, %r, %s, %v
   The type of machine, release of the operating system, name of the
   operating system, and version of the kernel, respectively, as re-
   turned by uname(3).
%%    A ``%'' character.

so for what you wanted:

 :ce:ck:np:im=\r\nThis Machine Is for Testing Only:\r\n\r\n:sp#9600:

other things to consider:
     /etc/motd          message-of-the-day
     /etc/nologin       disallows non-superuser logins

Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.