Link to home
Start Free TrialLog in
Avatar of rrijkse
rrijkse

asked on

Sending windows messenger messages on linux

Hello,

Is there anyway that I could automatically send a message to all of the computers on the network usign the windows messenger service(not M$N Messenger) from my red hat 9.0 server.

I would like to beable to make it so when the server restarts a message is sent.

- Robbert
Avatar of ThisIsMyName
ThisIsMyName

cat yourMessage.txt | smbclient -M [host]

where [host] is either a machine name or a user name.

If you have a list of hosts, you could make a simple script to message them all

#! /usr/bin/perl -w
open (IN,"listOfHosts.txt");
while (<IN>){
    chomp;
    system ("cat yourMessage.txt | smbclient -M $_");
}
close IN;

Note that messaging to users (rather than hosts) can be problematic if a user is signed on at more than one computer.
Avatar of rrijkse

ASKER

Thanks, that worked like a charm
Avatar of rrijkse

ASKER

I have one question, how would I make it so that that script runs when the redhat box is restarted?

If you can help me with that, i'll give you 100 points

- Robbert
you can call the script from /etc/rc.d/rc.local and it will do it's thing on startup... Hope that helps!
Avatar of rrijkse

ASKER

I need the server to send out a message, when the server is going to be down for a restart or shutdown.

I made a message saying: "The server will be down for the next few minutes." and I want that to be send to all of the computers on the network.

- Robbert
ASKER CERTIFIED SOLUTION
Avatar of ThisIsMyName
ThisIsMyName

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rrijkse

ASKER

Sorry about the delay, I completely forgot about this question.