Solved

"net send" for Solaris (how to send messages to Machines on Solaris Lan)

Posted on 2004-08-05
16
1,625 Views
Last Modified: 2013-12-21
I need to develop a script that will notify a handfull of users when a directoy listing changes.  This is non public internal Solaris lan.  I was leaning away from setting up sendmail just for these messages.  Is there a Solaris equiv to "net send" in windows.  I can't use wall or write becuse the user name is not unique.  I need to sent to a machine name.  

Thanks,
Chuck
0
Comment
Question by:ChuckVincent
  • 4
  • 4
  • 4
  • +2
16 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 11732760
why not simply just send emai (use mailx or mail).

You can also use "write" or rwall, have a look at the following page for more details:
http://rsusu1.rnd.runnet.ru/solaris2.7/Solaris_System_Administration_Guide-stripped/ch01/008-010.html
0
 
LVL 11

Expert Comment

by:jgiordano
ID: 11737872
Us the logger command that is used to send messages to syslog.

Basically you need to do the following:

1) edit the /etc/syslog.conf file; add an entry on for user.notice                              <user or groups>
2) stop and start syslog /etc/init.d/syslog (stop|start)
3) use the logger command - #logger -p user.notice   <MSG>

0
 

Author Comment

by:ChuckVincent
ID: 11738131
Do you guys read?  the user name or group is out.  The users are not UNIQUE.  There are 15 people loged into 15 different computers twith the same user.  I need to send to machine name/ip OR outside email.

0
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
LVL 34

Expert Comment

by:PsiCop
ID: 11738264
"rwall" seems to me to be what you want. Is there something about it that doesn't do what you need?
0
 
LVL 11

Expert Comment

by:jgiordano
ID: 11738325
You could set up syslog to send to syslog on a specific host using @host,@host instead of users;

1) edit the /etc/syslog.conf file ON YOUR BOX; add an entry on for user.notice                              @HOST,
0
 
LVL 11

Expert Comment

by:jgiordano
ID: 11738339
Then on the host set up the syslog.conf to foward the messages:

1) edit the /etc/syslog.conf file; add an entry on for user.notice                              <user or groups>
0
 
LVL 11

Expert Comment

by:jgiordano
ID: 11738408
rwall does send to the machine(s) specified and all users logged into those machines you don't specify the users
0
 

Author Comment

by:ChuckVincent
ID: 11761976

Please help with error below...

develop-harriet (31) ping harriet
harriet is alive
develop-harriet (32) rwall harriet
test
rwall: Can't send to harriet
harriet: RPC: Program not registered
develop-harriet (33) rwall -h harriet
test
rwall: Can't send to harriet
harriet: RPC: Program not registered
develop-harriet (34)
develop-harriet (37) rwall harriet < test.txt
rwall: Can't send to harriet
harriet: RPC: Program not registered
develop-harriet (38) cat test.txt | rwall harriet
rwall: Can't send to harriet
harriet: RPC: Program not registered
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 11762160
The host "harriet" may have been hardened and the "rwalld" daemon is not running, or all RPC services may have been turned off. Chect /etc/services
0
 

Author Comment

by:ChuckVincent
ID: 11762264
There is no rwall in the /etc/services  How do I add it?

-Chuck
0
 
LVL 34

Accepted Solution

by:
PsiCop earned 100 total points
ID: 11762381
Hmmm.... you would ask that when I don't have a Solaris machine handy to look at. I was just in a server last night, disabling this stuff. Whoops! OK, I found my notes on system hardening, and I directed you to the wrong file.

Look at /etc/inetd.conf, not /etc/services

About 1/3rd or so into the file, look for "walld"

That line needs to be UNcommented (does not start with a #). If it is commented, you'll need to uncomment it, save the file, and then restart the inetd process (for you, I suspect it will be easier to reboot the box).
0
 

Author Comment

by:ChuckVincent
ID: 11762466
I found it disabled in inetd.conf.  after enableing it and restarting inetd I can receive messages on harriet BUT ONLY in the console window.  I tried the '-a' like in wall to print messages to all ttys but that is not a valid option.  Without a console window open you miss the messages.

Is there a way to send to all terminals on a remote host?

-Chuck
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11771677
xmessage
if not installed to be found at http://www.sunfreeware.com/
0
 
LVL 34

Expert Comment

by:PsiCop
ID: 12133398
Interesting.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 12153671
cc: PsiCop
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

831 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