Subject: Re: Autologin into NetBSD
To: Jan Erik Freytag <netbsd-help@NetBSD.org, freytag@klaus-zeh.de>
From: Hubert Feyrer <hubertf@gmx.de>
List: netbsd-help
Date: 02/26/2005 20:21:55
In article <421A2846.5040304@klaus-zeh.de> you wrote:
> How can I autologin on a NetBSD system? After booting, I want to login
> a user automatically (and then start X, but that already works). I found
> some HowTos for FreeBSD, but the handling of ttys and gettytab seems to be
> a little different on NetBSD. Does anybody know how I can handle this
> on the NetBSD 2.0 machine in question?

You could use kdm, which allows automatically logging in users.

If you don't like that, here's what I use:

 * In /etc/ttys, I have:

	ttyE0   "/usr/local/bin/login-feyrer ttyE0" vt220 on secure
	#ttyE0  "/usr/libexec/getty Pc"         vt220   on secure

 * /usr/local/bin/login-feyrer is executable and contains:

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

 * It should be OK to keep a password on the account, "login -f"
   won't ask for it. 

 * I fire up X in my tcsh's .login: 

	startx
	logout                                 

Hope this helps.


 - Hubert

-- 
  ___ _ _  _   _        * Harddisk Image Cloning * 
 / __| | || | | |           www.feyrer.de/g4u/
| (_ |_  _| |_| |         
 \___| |_| \___/          Version 2.0 out now!