Hello, agetty sometimes changes the order of the characters of the username in the login prompt. For example, if I enter 'root' as username, the echo reads 'orot' and the login fails, because the user does not exist. A little bit background on the issue: I am running automated tests on an embedded device with an i.MX6 processor which connects to the board via serial console with 115200 baud. The test waits for the login prompt and then sends the username via the serial console. In about 20 % of the test runs the echoed username slightly differs from the sent username and the test fails. I can also reproduce the issue when connecting to the serial console via screen and pasting the username into the prompt. If I enter the username manually or connect strace to agetty, the username is always correct. I reproduced the problem on multiple different device (although all with the same SoC). I tested it with util-linux 2.29 with Linux 4.11-rc2 and 4.4.52. I was able to trace the issue to the wait_for_term_input() function. This function reads the first (few) bytes from the input queue and after reading reinserts the bytes with the TIOCSTI ioctl back into the queue. If new bytes are inserted into the input queue before the TIOCSTI happens, the input queue will contain the bytes in the wrong order and later reads on the input queue will not yield the original input. I also opened a bug in the kernel Bugzilla [1], because I am not sure about the correct way to report bugs in util-linux. Michael [1] https://bugzilla.kernel.org/show_bug.cgi?id=194905 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html