To reproduce, build current core-image-minimal for Poky with default config. Boot into qemu, then: root@qemux86:~# adduser test Changing password for test New password: Retype password: Password for test changed by root root@qemux86:~# su - test qemux86:~$ mesg n qemux86:~$ mesg y mesg: error: tty device is not owned by group `tty' qemux86:~$ cat ~/.profile # ~/.profile: executed by Bourne-compatible login shells. if [ -f ~/.bashrc ]; then . ~/.bashrc fi # path set by /etc/profile # export PATH mesg n Note that "mesg n" is run by default and just happens to work accidentally (?). qemux86:~$ ls -l /proc/self/fd/2 lrwx------ 1 test test 64 Mar 6 13:07 /proc/self/fd/2 -> /dev/ttyS0 qemux86:~$ ls -l /dev/ttyS0 crw------- 1 root root 4, 64 Mar 6 13:07 /dev/ttyS0 qemux86:~$ ls -l /usr/bin/mesg /usr/bin/mesg -> /usr/bin/mesg.sysvinit It fails slightly differently with systemd + pam (not tested without pam): DISTRO_FEATURES_append = " pam systemd" VIRTUAL-RUNTIME_init_manager = "systemd" VIRTUAL-RUNTIME_initscripts = "" DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit" qemux86 login: root root@qemux86:~# adduser test New password: Retype new password: passwd: password updated successfully root@qemux86:~# su - test mesg: Operation not permitted qemux86:~$ mesg n mesg: Operation not permitted qemux86:~$ mesg y mesg: Operation not permitted root@qemux86:~# ls -l /usr/bin/mesg lrwxrwxrwx 1 root root 19 Mar 6 13:11 /usr/bin/mesg -> /bin/busybox.nosuid Here "mesg" always fails and prints the error message. That the /dev/tty* permissions prevent using mesg after "su --login" is probably unavoidable. It does not happen when logging into the console as the user directly. However, the error message is annoying. Perhaps the default .profile should use "mesg n 2>/dev/null" ?
Patrick, would you be able to handle this? Your resolution seems sensible to me.
Fixed in "base-files: ignore "mesg n" error messages".