0

The description for the wall command states that it sends a message to all logged in users. However, the man page describes a flag, -g --group, which allows the sender to limit messages to a specified group:

-g, --group group Limit printing message to members of group defined as a group argument. The argument can be group name or GID.

However, I am only able to send messages to all logged in users. I have tried this command with:

  • -g my_group,
  • --group my_group,
  • -g "my_group",
  • --group "my_group",
  • --group=my_group

In addition, I have tried all of the above by replacing "my_group" (the group name) with the group ID to no avail.

I have also tried placing the flags after the message. None of this works to limit the messages to a given group. All messages go to all users. Am I misunderstanding the flag? The syntax? Is this command broken? Or is the man page simply incorrect? Please do not offer alternative commands, I am aware of their existence. I want to know how to use a listed option or why the option is not working correctly. I am using Ubuntu 20.04

1
  • Haven't tried to reproduce it, but I vaguely remember something similar :) Jun 23, 2022 at 17:51

1 Answer 1

0

Looked at the group membership checking code. Had a round of gdb --args wall -g root foobarbaz,

break is_gr_member
run
{wait for breakpoint to be hit}
finish 
print utmpptr->ut_user # this prints my own user name
step # this shows we're actually taking the branch as if I was a member of group root

So, yeah, that's a bug in wall's checking of group membership as it seems. Feel free to open a bug report on their bug tracker; however, honestly, the pressure to fix this should be very low! I doubt there's many legitimate users of this feature. Fixing this yourself would probably be pretty valuable, still, and if you have the C skills, please do that.

1
  • Marking this as the answer because I asked, "Is the command broken?" And it appears there is a bug. Thanks!
    – Johnny
    Jun 24, 2022 at 19:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .