Subject: Auto-login
To: None <current-users@netbsd.org>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: current-users
Date: 09/24/1998 00:34:16
Hi,

someone mentioned something about a "personal workstation", i.e. one used
exclusively by one individual. Having such a machine, i can imagine people
get tired of logging each time. Here's how to teach NetBSD to
automatically log in one user after booting up.

The whole trick is to put the login procedure into /etc/ttys. Sadly,
somely "login foo" won't work for some strange reasons (resulting in
"getty responding too fast"). Instead, putting the following line in will
work:

ttyv0   "/usr/local/bin/login-user"   pc3     on secure

ttyv0 here is a i386/pcvt console, any other should work.
/usr/local/bin/login-user does log in the user, it's a shell script:

#!/bin/sh
tty=/dev/$1
exec /usr/bin/login -f feyrer <$tty >$tty 2>$tty

Simple, and it works. After that, you should start up some window system
in your .login or whatever. 


 - Hubert

-- 
Hubert Feyrer <hubert.feyrer@rz.uni-regensburg.de>