Debian Jessie and autologin

Kernels & Hardware, configuring network, installing services

Debian Jessie and autologin

Postby debyrocks » 2014-12-09 20:11

I am trying to set up Debian Jessie to automatically login without a display manager. With the older version of Debian I would edit the file /etc/inittab and add a line 1:2345:respawn:/bin/login -f "user account" </dev/tty1>/dev/tty1 2>&1. But the Debian Jessie does not have this file.
debyrocks
 
Posts: 11
Joined: 2010-05-15 17:08

Re: Debian Jessie and autologin

Postby ohZeishi » 2014-12-09 22:39

With Jessie, Debian has decided to switch to a new default init system called systemd. And this new system doesn't use /etc/inittab. So you have two options to solve your problem:

You can either switch back to the old one (called sysvinit):
Code: Select all
# apt-get install sysvinit-core

This command should also remove systemd-sysv, which makes systemd your init system. After that, there should be a /etc/inittab which you can modify like on older versions of Debian. And after a reboot, sysvinit will be your init system.

Or you can configure systemd to do the automatic login. For that create the file /etc/systemd/system/getty@tty1.service.d/autologin.conf (you probably have to create the directory /etc/systemd/system/getty@tty1.service.d first) with content
Code: Select all
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin "user account" %I

and then reboot your system.
ohZeishi
 
Posts: 88
Joined: 2014-12-05 19:51

Re: Debian Jessie and autologin

Postby debyrocks » 2014-12-12 02:07

I got it working with the second method.
Thank you very much.
debyrocks
 
Posts: 11
Joined: 2010-05-15 17:08


Return to System configuration

Who is online

Users browsing this forum: No registered users and 9 guests

fashionable