Solved

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

Posted on 2004-08-05
16
1,620 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

758 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

22 Experts available now in Live!

Get 1:1 Help Now