Solved

Sending windows messenger messages on linux

Posted on 2003-11-15
7
227 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
Comment Utility
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
Comment Utility
Thanks, that worked like a charm
0
 

Author Comment

by:rrijkse
Comment Utility
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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Expert Comment

by:ThisIsMyName
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Sorry about the delay, I completely forgot about this question.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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 video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now