Solved

Sending windows messenger messages on linux

Posted on 2003-11-15
7
249 Views
Last Modified: 2010-03-18
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
0
Comment
Question by:rrijkse
  • 4
  • 3
7 Comments
 

Expert Comment

by:ThisIsMyName
ID: 9930721
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.
0
 

Author Comment

by:rrijkse
ID: 9933415
Thanks, that worked like a charm
0
 

Author Comment

by:rrijkse
ID: 9933433
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
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Expert Comment

by:ThisIsMyName
ID: 9934098
you can call the script from /etc/rc.d/rc.local and it will do it's thing on startup... Hope that helps!
0
 

Author Comment

by:rrijkse
ID: 9934437
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
0
 

Accepted Solution

by:
ThisIsMyName earned 50 total points
ID: 9941643
Ah.. ok. I thought you wanted to send out messages after the restart (which seemed a bit odd).

Look at your /etc/rc6.d/ directory.. you'll see entries like this


K05atd
K05keytable
K05saslauthd
K10cups
K10xfs
K15gpm
(etc)

make a symlink (ln -s [original file] [new location]) from your script to a file in this directory. Name it something like Kxxsendmsg. The numbers that you use for "xx" determine when your script will be run. On my system, K07sendmsg would be executed after the system
shuts down saslauthd and before it shuts down cupsd.

The rc6.d directory is used when your system restarts. Add an entry to rc0.d as well if you'd like your system to send out messages when things are halted, too.

Obviously, you want to run your script before things like samba and network are shut down.

Hope that's a bit more helpful :)
0
 

Author Comment

by:rrijkse
ID: 12116994
Sorry about the delay, I completely forgot about this question.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question