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 wallmessaging?
你如何阻止 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 rootfrom sending wall messages
这不会阻止root发送墙消息
回答by aqn
Note that every useron the machine that does not want to see a wallmessage has to do mesg n. Putting mesg nin /etc/profilemight do that for all users.
请注意,机器上不想看到消息的每个用户wall都必须这样做mesg n。把mesg n中/etc/profile可能做到这一点对所有用户。
Alternatively, if you only want rootto be able to run wall, change its permission: chmod 700 /usr/bin/wall.
或者,如果您只想root运行wall,请更改其权限:chmod 700 /usr/bin/wall。

