login.c has code /* If we can't find a pre-existing entry by pid, try by line. BSD network daemons may rely on this. (anonymous) */ if (utp == NULL) { setutent(); ut.ut_type = LOGIN_PROCESS; strncpy(ut.ut_id, tty_number, sizeof(ut.ut_id)); strncpy(ut.ut_line, tty_name, sizeof(ut.ut_line)); utp = getutid(&ut); } The problem is getutid will seatch for entries with the matching ut_id. However, it uses tty_number to match the ut_id. As the result, if the second remote login will match the "1" entry in /etc/inittab: 1:2345:respawn:/sbin/mingetty tty1 You can see that by logging on console and rlogin twice to the same machine. You won't see the user on console with # who The fix is to use getutline instead of getutid.
Created attachment 61507 [details] A patch
applied