This looks like this upstream bug: https://github.com/util-linux/util-linux/issues/859 The reason it doesn't affect releases before plucky is likely that there was a switch from shadow to util-linux.
The limitation appears intentional. To quote the manpage: If one uses the command login, then the surrounding shell gets killed by vhangup(2) because it’s no longer the true owner of the tty. This can be avoided by using exec login in a top-level shell or xterm. How is the environment which you are trying to run login from? sudo, ssh, tty, other? Wrapping the command (sudo -i login) seems to work around that limitation. ** Bug watch added: github.com/util-linux/util-linux/issues #859 https://github.com/util-linux/util-linux/issues/859 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to util-linux in Ubuntu. https://bugs.launchpad.net/bugs/2115838 Title: login command just Hangup immediately Status in util-linux package in Ubuntu: New Status in util-linux source package in Plucky: New Status in util-linux source package in Questing: New Bug description: login command just Hangup immediately. I see this issue with Plucky and Questing root@plucky:/home/ubuntu# login Hangup ubuntu@plucky:~$ root@plucky:~# strace login execve("/usr/bin/login", ["login"], 0x7ffd0e2dc9c0 /* 20 vars */) = 0 brk(NULL) = 0x56e0011a9000 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7d04a5962000 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=36429, ...}) = 0 mmap(NULL, 36429, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7d04a5959000 close(3) = 0 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpam.so.0", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=72064, ...}) = 0 mmap(NULL, 69648, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7d04a5947000 mmap(0x7d04a594a000, 40960, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7d04a594a000 mmap(0x7d04a5954000, 12288, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xd000) = 0x7d04a5954000 mmap(0x7d04a5957000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x10000) = 0x7d04a5957000 close(3) = 0 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpam_misc.so.0", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=22856, ...}) = 0 mmap(NULL, 24656, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7d04a5940000 mmap(0x7d04a5942000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7d04a5942000 mmap(0x7d04a5944000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x7d04a5944000 mmap(0x7d04a5945000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x7d04a5945000 close(3) = 0 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libaudit.so.1", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=153760, ...}) = 0 mmap(NULL, 200880, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7d04a590e000 mmap(0x7d04a5911000, 49152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7d04a5911000 mmap(0x7d04a591d000, 86016, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0x7d04a591d000 mmap(0x7d04a5932000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x24000) = 0x7d04a5932000 mmap(0x7d04a5934000, 45232, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7d04a5934000 close(3) = 0 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\245\2\0\0\0\0\0"..., 832) = 832 pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 840, 64) = 840 fstat(3, {st_mode=S_IFREG|0755, st_size=2182752, ...}) = 0 pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 840, 64) = 840 mmap(NULL, 2227832, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7d04a5600000 mmap(0x7d04a5628000, 1662976, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x28000) = 0x7d04a5628000 mmap(0x7d04a57be000, 323584, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1be000) = 0x7d04a57be000 mmap(0x7d04a580d000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x20c000) = 0x7d04a580d000 mmap(0x7d04a5813000, 52856, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7d04a5813000 close(3) = 0 openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libcap-ng.so.0", O_RDONLY|O_CLOEXEC) = 3 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\0\0\0\0\0\0\0"..., 832) = 832 fstat(3, {st_mode=S_IFREG|0644, st_size=31024, ...}) = 0 mmap(NULL, 32816, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7d04a5905000 mmap(0x7d04a5907000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7d04a5907000 mmap(0x7d04a590b000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7d04a590b000 mmap(0x7d04a590c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7d04a590c000 close(3) = 0 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7d04a5903000 mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7d04a5901000 arch_prctl(ARCH_SET_FS, 0x7d04a59045c0) = 0 set_tid_address(0x7d04a5904890) = 256045 set_robust_list(0x7d04a59048a0, 24) = 0 rseq(0x7d04a59044c0, 0x20, 0, 0x53053053) = 0 mprotect(0x7d04a580d000, 16384, PROT_READ) = 0 mprotect(0x7d04a590c000, 4096, PROT_READ) = 0 mprotect(0x7d04a5932000, 4096, PROT_READ) = 0 mprotect(0x7d04a5957000, 4096, PROT_READ) = 0 mprotect(0x7d04a5945000, 4096, PROT_READ) = 0 mprotect(0x56dff9b1b000, 4096, PROT_READ) = 0 mprotect(0x7d04a59a4000, 8192, PROT_READ) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 munmap(0x7d04a5959000, 36429) = 0 openat(AT_FDCWD, "/proc/sys/kernel/cap_last_cap", O_RDONLY) = 3 fstatfs(3, {f_type=PROC_SUPER_MAGIC, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={val=[0x18, 0]}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_NOSUID|ST_NODEV|ST_NOEXEC|ST_RELATIME}) = 0 read(3, "40\n", 7) = 3 close(3) = 0 prctl(PR_CAPBSET_READ, CAP_CHOWN) = 1 prctl(PR_GET_SECUREBITS) = 0 prctl(PR_GET_NO_NEW_PRIVS, 0, 0, 0, 0) = 0 prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_IS_SET, CAP_CHOWN, 0, 0) = 0 getpid() = 256045 getrandom("\x65\x99\x4e\x8d\x18\x2d\xba\x42", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x56e0011a9000 brk(0x56e0011ca000) = 0x56e0011ca000 openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=3063024, ...}) = 0 mmap(NULL, 3063024, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7d04a5200000 close(3) = 0 openat(AT_FDCWD, "/etc/login.defs", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=5939, ...}) = 0 read(3, "#\n# /etc/login.defs - Configurat"..., 4096) = 4096 read(3, "# any combination of letters \"fr"..., 4096) = 1843 read(3, "", 4096) = 0 close(3) = 0 openat(AT_FDCWD, "/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=2996, ...}) = 0 read(3, "# Locale name alias data base.\n#"..., 4096) = 2996 read(3, "", 4096) = 0 close(3) = 0 openat(AT_FDCWD, "/usr/share/locale/en_US.UTF-8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale/en_US.utf8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale/en_US/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale/en.UTF-8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale/en.utf8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale/en/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale-langpack/en_US.UTF-8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale-langpack/en_US.utf8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale-langpack/en_US/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale-langpack/en.UTF-8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale-langpack/en.utf8/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/usr/share/locale-langpack/en/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory) rt_sigaction(SIGALRM, {sa_handler=0x56dff9b16ff0, sa_mask=[ALRM], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7d04a5645810}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 rt_sigaction(SIGALRM, NULL, {sa_handler=0x56dff9b16ff0, sa_mask=[ALRM], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7d04a5645810}, 8) = 0 rt_sigaction(SIGALRM, {sa_handler=0x56dff9b16ff0, sa_mask=[ALRM], sa_flags=SA_RESTORER, sa_restorer=0x7d04a5645810}, NULL, 8) = 0 alarm(60) = 0 rt_sigaction(SIGQUIT, {sa_handler=SIG_IGN, sa_mask=[QUIT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7d04a5645810}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 rt_sigaction(SIGINT, {sa_handler=SIG_IGN, sa_mask=[INT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7d04a5645810}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 setpriority(PRIO_PROCESS, 0, 0) = 0 getuid() = 0 geteuid() = 0 getgid() = 0 getegid() = 0 prctl(PR_GET_DUMPABLE) = 1 (SUID_DUMP_USER) close_range(3, 4294967295, 0) = 0 setpgid(0, 0) = 0 ioctl(0, TCGETS, {c_iflag=ICRNL|IXON, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B9600|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0 ioctl(0, TCGETS, {c_iflag=ICRNL|IXON, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B9600|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0 ioctl(0, TCGETS, {c_iflag=ICRNL|IXON, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B9600|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0 fstat(0, {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}) = 0 readlink("/proc/self/fd/0", "/dev/pts/1", 4095) = 10 newfstatat(AT_FDCWD, "/dev/pts/1", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, 0) = 0 ioctl(0, TCGETS, {c_iflag=ICRNL|IXON, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B9600|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0 newfstatat(AT_FDCWD, "/dev/pts/1", {st_mode=S_IFCHR|0600, st_rdev=makedev(0x88, 0x1), ...}, AT_SYMLINK_NOFOLLOW) = 0 access("/dev/pts/1", R_OK|W_OK) = 0 ioctl(0, TIOCGWINSZ, {ws_row=116, ws_col=345, ws_xpixel=640, ws_ypixel=480}) = 0 ioctl(0, TCGETS, {c_iflag=ICRNL|IXON, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B9600|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0 fchown(0, 0, 0) = 0 fchmod(0, 0600) = 0 ioctl(0, TCGETS, {c_iflag=ICRNL|IXON, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B9600|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = 0 ioctl(0, TCSETS, {c_iflag=ICRNL|IXON, c_oflag=NL0|CR0|TAB0|BS0|VT0|FF0|OPOST|ONLCR, c_cflag=B9600|CS8|CREAD, c_lflag=ISIG|ICANON|ECHO|ECHOE|ECHOK|IEXTEN|ECHOCTL|ECHOKE, ...}) = ? ERESTARTSYS (To be restarted if SA_RESTART is set) --- SIGTTOU {si_signo=SIGTTOU, si_code=SI_KERNEL} --- --- stopped by SIGTTOU --- root@oracular:~# ldd /usr/bin/login linux-vdso.so.1 (0x0000753d92a12000) libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x0000753d92913000) libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x0000753d92902000) libpam_misc.so.0 => /lib/x86_64-linux-gnu/libpam_misc.so.0 (0x0000753d928fb000) libaudit.so.1 => /lib/x86_64-linux-gnu/libaudit.so.1 (0x0000753d928c9000) libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x0000753d928b3000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000753d92600000) libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x0000753d928a4000) /lib64/ld-linux-x86-64.so.2 (0x0000753d92a14000) libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0 (0x0000753d9289c000) libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x0000753d9288d000) root@plucky:~# ldd /usr/bin/login linux-vdso.so.1 (0x00007cc5a1353000) libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007cc5a1325000) libpam_misc.so.0 => /lib/x86_64-linux-gnu/libpam_misc.so.0 (0x00007cc5a131e000) libaudit.so.1 => /lib/x86_64-linux-gnu/libaudit.so.1 (0x00007cc5a12ec000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007cc5a1000000) libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0 (0x00007cc5a12e3000) /lib64/ld-linux-x86-64.so.2 (0x00007cc5a1355000) root@oracular:/home/ubuntu/util-linux/util-linux-2.40.2# apt show login Package: login Version: 1:4.15.3-3ubuntu2 Priority: required Protected: yes Section: admin Source: shadow Origin: Ubuntu Maintainer: Ubuntu Developers <[email protected]> Original-Maintainer: Shadow package maintainers <[email protected]> Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 672 kB Depends: libpam-modules, libpam-runtime, libaudit1 (>= 1:2.2.1), libbsd0 (>= 0.11.0), libc6 (>= 2.38), libcrypt1 (>= 1:4.1.0), libpam0g (>= 0.99.7.1), libsystemd0 Conflicts: python-4suite (<< 0.99cvs20060405-1) Homepage: https://github.com/shadow-maint/shadow Task: cloud-minimal, minimal, server-minimal Download-Size: 133 kB APT-Manual-Installed: no APT-Sources: http://kr.archive.ubuntu.com/ubuntu oracular/main amd64 Packages Description: system login tools This package provides support for console-based logins and for changing effective user or group IDs, including: * login, the program that invokes a user shell on a virtual terminal; * nologin, a dummy shell for disabled user accounts; ubuntu@plucky:~/util-linux/util-linux-2.40.2$ apt show login Package: login Version: 1:4.16.0-2+really2.40.2-14ubuntu1 Priority: required Protected: yes Section: admin Source: util-linux (2.40.2-14ubuntu1) Origin: Ubuntu Maintainer: Ubuntu Developers <[email protected]> Original-Maintainer: util-linux packagers <[email protected]> Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 202 kB Pre-Depends: login.defs (>= 1:4.16.0-1~) Depends: libpam-modules, libpam-runtime, libaudit1 (>= 1:2.2.1), libc6 (>= 2.38), libcrypt1 (>= 1:4.1.0), libpam0g (>= 0.99.7.1) Homepage: https://github.com/util-linux/util-linux Task: minimal Download-Size: 77.8 kB APT-Manual-Installed: no APT-Sources: http://kr.archive.ubuntu.com/ubuntu plucky/main amd64 Packages Description: system login tools This package provides support for console-based logins and for changing effective user or group IDs, including: * login, the program that invokes a user shell on a virtual terminal, * nologin, a dummy shell for disabled user accounts, * newgrp, a program to change the effective group IDs. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/2115838/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : [email protected] Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp

