[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: configuring shell autologin

On Thu, 19 Jun 2008 22:43:22 -0700
Lee Glidewell <lee.glidewell@gmail.com> wrote:

> First of all, why: this is for a single-user laptop with an encrypted
> hard drive. If someone gets past the initial passkey, they have all
> of my respect as well as my data. I'm trying to cut down on the
> amount of typing I have to do at startup (currently, between the hdd,
> the login, setting up wireless and unlocking the keyring that stores
> my e-mail/web passwords, I type 4 passwords/-keys). 

Another way to do this (shamelessly stolen from a coworker):

first, install rungetty

1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/rungetty -u root tty2 /bin/autologin
3:23:respawn:/sbin/rungetty -u root tty3 /bin/autologin

Contents of /bin/autologin:
/bin/login -f root

I do this on my home file server so that the other folks in the house
who have only ever used Windows are still prompted with a login if they
ever get nosy and sit down in front of that box, but I have two root
terminals logged in at the console that I can work with without having
to login (it should be noted that root has no valid password on this
box, the only way to log directly in as root is via ssh key or sitting
down at the box and using the virtual terms)

> I have so far tried two autologin solutions: rungetty, and this
> script (named as /sbin/autologin):
>   #!/bin/bash
>   exec 0</dev/$1 1>/dev/$1 2>&1
>   cat /etc/issue
>   shift
>   exec $*
> I have setup tty1 to use these scripts for autologin, and get the
> same error message with both. Here are the inittab lines I used for
> each of the two: 1:2345:respawn:/sbin/rungetty tty1 --autologin lee
> and
>   1:2345:respawn:/sbin/autologin tty1 login -f lee
> In both cases, the response I get is that the terminal is respawning
> too frequently, and the terminal is locked for five minutes. I don't
> understand the getty applications well enough to figure out what to
> do next.
> What am I missing? :)

Attachment: signature.asc
Description: PGP signature

Reply to: