How to auto-login on boot up

Matthew Seaman m.seaman at infracaninophile.co.uk
Tue Mar 30 09:10:56 PST 2004


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).

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040330/29ec5d2b/attachment-0001.bin


More information about the freebsd-questions mailing list