LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Broadcasting message to Windows machines (https://www.linuxquestions.org/questions/linux-newbie-8/broadcasting-message-to-windows-machines-351771/)

muldereric 08-10-2005 04:18 AM

Broadcasting message to Windows machines
 
At my work we are using a RH9 fileserver. Sometimes this server is taken down for maintenance. When you switch to another runlevel a nice message "The system is going down for ... NOW!". This message is only broadcasted to local users, but I wish it would also be broadcasted to the connected Windows clients (like messages that you can send from within Windows using the net send command).
What program do I have to use for this and how can I run this when we switch to another runlevel?

Chuckinator 08-10-2005 09:11 AM

I believe "smbclient -M" will send messages to windows machines (like net send). From the smbclient man page:
Quote:

-M NetBIOS name
This options allows you to send messages, using the "WinPopup" protocol, to another computer.
Once a connection is established you then type your message, pressing ^D (control-D) to end.

If the receiving computer is running WinPopup the user will receive the message and probably a
beep. If they are not running WinPopup the message will be lost, and no error message will oc-
cur.

The message is also automatically truncated if the message is over 1600 bytes, as this is the
limit of the protocol.

One useful trick is to cat the message throughsmbclient. For example: cat mymessage.txt | smb-
client -M FRED will send the message in the file mymessage.txt to the machine FRED.

You may also find the -U and-I options useful, as they allow you to control the FROM and TO
parts of the message.

See the message command parameter in the smb.conf(5) for a description of how to handle incoming
WinPopup messages in Samba.

Note: Copy WinPopup into the startup group on your WfWg PCs if you want them to always be able
to receive messages.
I'm not sure how to automatically send a message when you switch runlevels, though.

muldereric 08-11-2005 03:29 AM

Quote:

Originally posted by Chuckinator
I believe "smbclient -M" will send messages to windows machines (like net send). From the smbclient man page:
I'm not sure how to automatically send a message when you switch runlevels, though.

Thanks for your help. The smbclient -M command works just fine, but I still have to find out how to send a message to the whole workgroup, or I have to send a separate message to every client which I don't like :P

Kdr Kane 08-11-2005 09:29 AM

With net send, you can send the message to the "domain" or the "workgroup". I'm guessing you could do the same here.

muldereric 08-11-2005 09:36 AM

Quote:

Originally posted by Kdr Kane
With net send, you can send the message to the "domain" or the "workgroup". I'm guessing you could do the same here.
The manual page shows you have to enter a netbios name, don't think it will work when entering the domain name


All times are GMT -5. The time now is 02:34 PM.