Homepage Wiki Forum Buy

Automatic login to Gnublin



Quickstart Debian autologin

First you get the program mingetty from here

then you make the file executable with

chmod +x mingetty

Now we copy the file into the /sbin directory at the SD-card.

Then we edit some lines in the /etc/inittab.

the following line at the end of the file gets a # on the start

T0:2345:respawn:/sbin/getty -L ttyS0 115200 vt102

now it looks like:

#T0:2345:respawn:/sbin/getty -L ttyS0 115200 vt102

Now we must just add the following two lines at the end:

ge0:2345:wait:/sbin/mingetty --autologin root ttyS0 linux
ge1:2345:respawn:/sbin/mingetty ttyS0 linux

save the file and yet the autologin works on the next boot.

Automatic login old

The one who often works with GNUBLIN may get annoyed of the login again and again. This article will describe how to login automatically. The process of login can be localised in the /etc/inittab file. The line

S:2345:respawn:/sbin/getty 115200 ttyS0

ensures, that at the end of the init prozess, getty on the serial interafce ttyS0 with 115200 baud will start an wait for the login name.

The solution approach now is, to force getty with a special option to an automatic login. There you have to download an other getty programm which gots more option possibilities. In our case we take mingetty.

Therefore mingetty has to be copied to /sbin/ and it can be found [| here ].

After that you have to change the old line like following:

ge0:2345:wait:/sbin/mingetty --autologin root ttyS0 linux

Note, that respawn was changed to wait. Because of that the automatic login only happens one time. If you want to change this do the follow:

ge1:2345:respawn:/sbin/mingetty ttyS0 linux

The labels ge0 and ge1 distinguish from each other.

Now the login starts automatically:

EDLK (Built by Poky 5.0) 5.0 armv5te ttyS0 armv5te login: root (automatic login) login[576]: root login on `ttyS0' root@armv5te:~#

After an exit from login-shell the normal prompt will be displayed:

root@armv5te:~# exit EDLK (Built by Poky 5.0) 5.0 armv5te ttyS0 armv5te login:

Hint: It's not recommended that you used to be work as root on GNUBLIN,only if a task requires that. Becaus the danger is great, that you delete very important data of the filesystem. With the command adduser you can make a new user!

Alternative agetty

Use the version of agetty from the package util-linux-2.20.1.

ag0:2345:wait:/sbin/agetty -a root -8 -s 115200 ttyS0 linux
ag1:2345:respawn:/sbin/agetty -8 -s 115200 ttyS0 linux

Alternative with login

:1:2345:respawn:/bin/login -f YOUR_USER_NAME tty1 </dev/tty1 >/dev/tty1 2>&1

Reference: [1]

Involved files

  • /etc/issue
root@gnublin:~# cat /etc/issue Debian GNU/Linux 6.0 \n \l

Mingetty and agetty can both been found in this directory:



In other languages