AnsweredAssumed Answered

LS1012A Cannot login automatically as root

Question asked by li yh on Nov 14, 2019
Latest reply on Nov 29, 2019 by li yh


     I want to login automatically as root after the system boot and no password required! I've tried modify “/lib/systemd/system/getty@.service” content as follows:

annotate "#ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I $TERM"

and add "ExecStart=-/sbin/agetty --autologin root --noclear %I $TERM" or "ExecStart=-/sbin/agetty -a root --noclear %I $TERM",but it didn't work!

    Second:modify "/etc/passwd",change "root:x:0:0:root:/root:/bin/bash" to "root::0:0:root:/root:/bin/bash".

    Now I don't need to enter a password,but still need to enter a user name "root".

    Why doesn't it work?


Startup information:


[ OK ] Started Permit User Sessions.
[ OK ] Started vsftpd FTP server.
[ OK ] Started Serial Getty on ttyS0.
Starting Set console scheme...
[ OK ] Started Ubuntu FAN network setup.
[ OK ] Started Set console scheme.
[ OK ] Created slice system-getty.slice.
[ OK ] Started Getty on tty1.
[ OK ] Reached target Login Prompts.
[ OK ] Started LSB: HPA's tftp server.
[ OK ] Started OpenBSD Secure Shell server.
[ OK ] Started LSB: network benchmark.
[ OK ] Started Lighttpd Daemon.
[ OK ] Started LXC network bridge setup.
Starting LXC Container Initialization and Autoboot Code...
[ OK ] Started LXC Container Initialization and Autoboot Code.
[ OK ] Started Samba NMB Daemon.
Starting Samba SMB Daemon...
[ OK ] Started Virtualization daemon.

Ubuntu 18.04.1 LTS localhost ttyS0

localhost login: root
Last login: Sun Jan 28 15:58:27 UTC 2018 on tty1
Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.14.47 aarch64)

* Documentation:
* Management:
* Support: