Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Mar 2004 15:26:00 +0100
From:      "Richard P. Williamson" <richard.williamson@u4eatech.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: How to auto-login on boot up
Message-ID:  <6.0.3.0.2.20040331150551.024c45a8@cygnus>
In-Reply-To: <20040330171038.GA92336@happy-idiot-talk.infracaninophile.c o.uk>
References:  <405FD7BD.8060004@smxy.org> <Pine.GSO.4.33.0403300934050.23041-100000@themis.cs.uh.edu> <20040330171038.GA92336@happy-idiot-talk.infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
At 18:10 30/03/2004, Matthew Seaman wrote:
>On Tue, Mar 30, 2004 at 09:47:45AM -0600, Pranav A. Desai wrote:
>
>>    Is there a way to auto login on the console when the system boots up.
>> So that I can run a script that will provide with a menu to the user
>> instead of the login prompt. And also if the script is killed or it dies
>> it should respawn.
>> Something similar to what /etc/inittab can do in linux.
>> I would appreciate any suggestions or solutions.
>
>See ttys(5), getty(8), gettytab(5).  Basically you setup a terminal
>type via /etc/gettytab -- copy the 'Pc' entry and append the
>'al=username' property -- which causes that terminal to autologin as
>the named user. Then you use /etc/ttys to tell the system to run a
>getty(8) with that terminal type on a particular tty (the console, or
>a vty) -- init(8) scans the /etc/ttys file and will detect when the
>associated getty program exits and respawn it.
>
>Set the login shell of the username you select to the program you want
>to run on the console, and take steps so that you can't get into that
>account by other means, like ftp(1) or ssh(1).

I'm trying to set this up also, can you check this for sanity?

gettytab:
  bootupcli:\
    :ht:np:sp#9600:al=admin:tc=std.9600

ttys:
  ttyd0 "/usr/libexec/getty bootupcli"  cons25w on insecure

user 'admin' uses tcsh, his .cshrc is simply:
  exec /cli/cli

For the purposes of this exercise, telnet is turned off, however
will be enabled later, and will also enter into the cli when
the user admin telnets in.  ftp will never be an issue.

I'm trying to test the above right now, but my com ports seem
to have up and wandered off.   The console output goes to sio0,
which I'm trying to stop, either be redirecting it or simply
shutting it off.  I tried removing the 'can be console' flags
from my config and recompiling, but that caused the serial ports
to just stop working.  I'm now recompiling with the 'can be a 
console' (0x10) flag on sio2 instead of sio0, but keep getting
'sio2: irq 5 not on list of probed irqs!' and no talky via porty.

I'd welcome any suggestions.

Regards,
TIA,
rip



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6.0.3.0.2.20040331150551.024c45a8>