Unix 如何阻止 unix/linux `wall` 消息传递?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9793601/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unix how do you block unix/linux `wall` messaging?
提问by stackoverflow
How do you block unix/linux wall
messaging?
你如何阻止 unix/linuxwall
消息传递?
Example:
SSH somemachine
WALL annoy the s*** out of people on machine
Desired goal: deny wall on owned machine
期望目标:拒绝拥有机器上的墙
采纳答案by Alex
mesg n
mesg n
From the man page
从手册页
DESCRIPTION
Mesg controls the access to your terminal by others. It's typically used to allow or disallow other users to write to your terminal (see write(1)).
Edit:
编辑:
This will notprevent root
from sending wall messages
这不会阻止root
发送墙消息
回答by aqn
Note that every useron the machine that does not want to see a wall
message has to do mesg n
. Putting mesg n
in /etc/profile
might do that for all users.
请注意,机器上不想看到消息的每个用户wall
都必须这样做mesg n
。把mesg n
中/etc/profile
可能做到这一点对所有用户。
Alternatively, if you only want root
to be able to run wall
, change its permission: chmod 700 /usr/bin/wall
.
或者,如果您只想root
运行wall
,请更改其权限:chmod 700 /usr/bin/wall
。