0

On occasion administrators working on a given system will "collide" with one another when one administrator's actions impact the other. Part of my solution is to add 'who' to root's .profile so that, when an administrator sudo's to root, they will know if other administrator's are currently on the system. I would like to alert all administrators to the "entrance" of an additional administrator as well. I tried wall, write or echo "Blah" > /dev/pts1 (whatever). The problem I have (unless I missed an option in the man page) with these approaches is that, when the message appears, it "takes focus" and can leave you wondering what the state of your session is. I've learned that you can continue typing and haven't been disrupted but it's still bothersome. We also have some administrators who wouldn't know what to do if that happened to them. I'm also trying to avoid chat applications because I want people to be able to continue working.

Are there better options or something I've missed which will alleviate this issue? What would be ideal would be a popup in a separate context.

4
  • 4
    You're looking for a technical solution to a more serious problem: Your administrators should not be coordinating through "wall"! At minimum, you should have some kind of ticketing system to track work so that people are not trying to do the same thing and stepping on each other. And of course all your admins should have access to some way to talk to each other, such as a chat system. It's a little strange that you seem to want to avoid the obvious and proven solutions. Nov 4 '18 at 2:27
  • I suspected I would receive that reply, the situation was an after-hours (early morning) "service down" where administrators were connecting from home as soon as they were aware of the problem. Granted, a ticketing system or change control should solve this issue but I'm looking for a solution in less than ideal situations where speed of resolution is paramount. Nov 4 '18 at 2:50
  • 1
    In that case, someone has "the pager" (even if it's a cell phone) and there is a defined escalation path for after hours response. Only the on call person responds, unless some time passes and she hasn't responded. Nov 4 '18 at 2:51
  • It looks like you are texting all the staff with all the monitoring events. Early in the morning. Oh.
    – kubanczyk
    Nov 6 '18 at 19:02
2

I think wall, is the utility you might want to use. It broadcasts the message to all the users on the system, that are currently logged in.

I would use the following statement instead to notify others, that the user logged in:

[usera@server ~]$ echo $USER logged in | wall

    Broadcast message from usera@server(Mon Nov  5 09:48:53 2018):

    usera logged in

It's up to you where to put this command, one of the way would be putting it in the end of the following file:

#/etc/profile
echo $USER logged in | wall  

It will work as a welcome message when somebody logs in, but it will trigger a wall command, that will send notification to all of the users currently in the system.

Hope this helps.

1

I've used an XMPP server (eg: jabber, openfire) for this in the past and setup a group chat. This keeps interruptions out of the console/vi sessions/etc.. Logins are broadcast to the chat room with simple one-line messages (I believe I used ~/.bash_profile and ~/.bash_logout, however it took some experimentation). admins have a quick way to collaborate as well and be notified who is on what system. Also creates a handy audit trail if something grenades during the weekend.

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