How to get a login screen on a serial terminal?

I am trying to connect a serial (dumb) terminal to my ubuntu 16.04LTS system. There are some how-to's around, but I have problems with them . What I need is a "simple" logon message on the serial terminal - after all UNIXoids are multi-user-systems. One of the suggestions even led to a dead system, requiring a re-install.

GtkTerm using /dev/ttyS0 connects OK to the terminal, i.e. typing text on the serial terminal and reading it on GtkTerm works OK as well typing on the Gtk and reading on the dumb terminal - so the connection is set-up basically OK.

I read "https://help.ubuntu.com/community/SerialConsoleHowto", but I am not sure which portions I need when I need an additional "login" screen on the dumb terminal, "only".

For the above text, I set-up the file for ttyS0 as mentioned but I am facing issues when entering sudo start ttyS0:

start: Connection to upstart not possible: Failed to connect to socket /com/ubuntu/upstart: connection set-up rejected."

The user is member of these groups: uucp dialout cdrom sudo dip plugdev lpadmin sambashare

I don't want to tamper with GRUB etc, I just need an Ubuntu login-screen, like the ones you see when typing e.g. CTRL-ALT 1..6, only on the serial dumb terminal.

Any advice pointing me in the right direction will be highly appreciated


Solution 1:

The SerialConsoleHowto you link to has become outdated with the replacement of upstart by systemd. The error you see is emitted by the upstart backward compatibility layer.

Systemd has a service called serial-getty which does precisely what you need. Its service definition at /lib/systemd/system/[email protected] references man systemd-getty-generator and this documentation, according to which all you need to do is add a kernel parameter console=ttyS0.

If this works as advertised (I cannot test this on my machine), please consider updating the SerialConsoleHowto to include this information in a section for "Xenial and later".