Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Linux server with about 20 users. They were using wall command which is annoying. I have root permissions and still want to be able to use it myself. But, how can I restrict normal users from using the Linux wall command?

share|improve this question
    
mesg n , can deny message that work for individual user, but I looking for a way to disable/deny all users except root on this host. –  isara Jan 2 '12 at 20:55
add comment

2 Answers

up vote 4 down vote accepted

If you want to deny access to for all users, then you might want to remove the setgid bit on /usr/bin/wall:

$ ls -l /usr/bin/wall
-rwxr-sr-x 1 root tty 13884 2011-08-09 12:15 /usr/bin/wall
$ sudo chmod g-s /usr/bin/wall

$ echo foo | wall

You should always be able to wall yourself and root should be able to wall everyone, but user A won't be able to broadcast to the rest of the users.

share|improve this answer
    
Wow , thank you very much. Accepted as an answer. –  isara Jan 4 '12 at 14:04
add comment

Personally, I would find out why they are using wall, and then ask them to use a more appropriate service such as write or talk. If they are not willing to comply, then BOFH. Technology is not an answer in these cases.

share|improve this answer
    
May be the person who use wall command just want to have some fun without noticed that the rest users suffered. Most of the user don't know about linux much , so they cannot deny message by themselve. –  isara Jan 4 '12 at 14:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.