0

OS: xUbuntu 22.04

I want to use the write / wall commands for sending msgs to other users sharing the same computer.

But when I try to use the write command, I get the following error:

√ ~ $ who
user1   tty7         2024-05-12 06:40 (:0)
user2  tty8         2024-05-13 06:56 (:1)
user3    tty9         2024-05-16 06:09 (:2)
user4    tty10        2024-05-16 11:54 (:3)
√ ~ $ write user2 tty8
write: effective gid does not match group of /dev/pts/13

The error is the same no matter what variation of the command I try: write user2, write user2 /dev/pts/13 or write user2 pts/13

I have been searching online and found just a few blurbs about the error. One such blurb seemed to suggest this behaviour was intentional, at least for Debian/buntu.

https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/2064685

I did try the advice in the link above to:

If you wish to restore the previous behavior, it should be sufficient to change /usr/bin/write.ul to root:tty 02755.

So that now my /etc/bin/write.ul has the setgid bit set:

√ ~ $ sudo chmod 02755 /usr/bin/write.ul

√ ~ $ ls /usr/bin/write.ul
-rwxr-sr-x 1 root root 23K Apr  9 10:32 /usr/bin/write.ul*

but doing so has made no change in the error received.

Any ideas what more I likely need to do to get these commands working as intended?

1

2 Answers 2

2

As per the advice you quote, you need to

sudo chown root:tty /usr/bin/write.ul

Your ls output shows that it is still owned by root:root.


P.S. You might need to do the chmod again after the chown.

-1

Tested on Ubuntu 24.04, modify tty as primary group, it works!

$ sudo usermod -g tty user1
1
  • 3
    But then all the files you create will be owned by group tty, which is probably not what you want — especially on a shared computer! Commented Sep 17 at 14:58

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.