0

A non-root user X cannot message a user Y. This is despite both users having successfully run mesg y. I've tried following advice for similar problems on Ubuntu described in this question. No luck.

A root user can message anybody.

I have a rough feeling that appropriate configuration of /etc/login.defs or PAM configuration files would solve the problem, but don't know enough to troubleshoot further. Any suggestions?

I am locally logged in as user picrin on tty1 and as user iva on tty2. User iva is also sshed into the box.

EDIT #1

For the sake of completeness here's more info. This is returned by who:

picrin   tty1         2014-10-18 22:10
iva      pts/1        2014-10-19 10:09 (hostXXX-XXX-XX-X.rangeXXX-XXX.btcentralplus.com)
iva      tty2         2014-10-19 10:13

This is returned when user picrin executes write iva tty2:

write: iva has messages disabled on tty2

This is returned when user picrin executes write iva pts/1:

write: iva has messages disabled on pts/1

This is returned when user iva runs mesg:

is y

I'm running Fedora 20.

2
  • 1
    When asking for help, please provide the command you are running, and any output generated by the command.
    – phemmer
    Commented Oct 18, 2014 at 23:03
  • I have updated my question accordingly @Patrick Commented Oct 19, 2014 at 9:33

2 Answers 2

0

I just tried this on my Fedora 19 system and was able to write messages from user X to user Y as follows.

user X (samtest)

In samtest's terminal I ran the following command:

$ write saml
blah
blah
blah
Ctrl+D
user Y (saml)

In saml's terminal I saw the following message:

Message from [email protected] on tty3 at 21:03 ...
blah
blah
blah
EOF
0
0

The solution is in adding both user iva and user picrin to the group tty and modifying the /etc/login.defs to include a line TTYPERM 0620. This solves the problem.

3
  • Just an FYI I do not have such an entry in my /etc/login.defs and neither of my users are in such a group, tty, and write works fine for me.
    – slm
    Commented Oct 19, 2014 at 12:39
  • @slm Interesting. That might be a difference between fedora 19 and fedora 20. Commented Oct 26, 2014 at 10:26
  • I have that distro as well and it works the same on both. It works on all the versions of Fedora that I have which varies b/w F3 up to F20. There's something configured strangely on your system, would be my guess.
    – slm
    Commented Oct 26, 2014 at 14:28

You must log in to answer this question.

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