Is it possible to send and receive "Net Send" messages in Linux?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Is it possible to send and receive "Net Send" messages in Linux?
Hi Linux experts,
I was wondering if anyone has ever been able to use the Windows networking "net send" commands in Linux. Either send messages, receive them, or both. Or if this is even possible.
Cool. Thanks guys - here's the results of fur's suggestion
$ smbclient -M HOSTNAME message
added interface ip=192.168.1.157 bcast=192.168.1.255 nmask=255.255.255.0
Connected. Type your message, ending it with a Control-D
test messagesent 12 bytes
$
So although I typed the message, it seems that smbclient -M will prompt you for it. However, it did successfully send and the client received it.
However, I sent a netsend message from the Windows client to myself, and although it said "sent successfully", nothing happened on my Linux computer. Maybe I need linpopup running or something?
Yeah, indeed you need linpopup (or whatever graphic client) running.
From LinPopUp documentation:
" If you close it, it will continue to receive all messages that are send to you. You can even quit Xwindow, and still receive messages. In fact, the only way to miss a message that was sent to you is to have your computer turned off. "
So, as soon as you launch it, it receives messages sent to your linux box.
You can use //192.168.x.x without the "-M", for connecting to samba/windows machines.
# smbclient \\\\192.168.x.x\\share
Remember to double the bars to "escape" the shell. And remember the orientation of the bars is inverse on Windows & *nix
.....................................
1)
I tried all you asked me to try.
But still cannot.
Actually, I wanna test sending msg from one machine to another.
1)
You must not provide the content of the message to "smbclient -M" until you receive the message: "Connected. Type your message, ending it with a Control-D"
I mean, "smbclient -M" does not send the message you write after the command (in your example 'ok ok') like windows "net send" would. What it does is to establish a channel for you to write the message and then end the session (and send the message) when you press CTRL+D.
Take a look. I issued some commands in my shell;
- First, your wrong one:
$ smbclient -M 10.32.26.11 'ok ok'
ok ok: Not enough '\' characters in service
Modo de Uso: smbclient ...........
- Now, the right one:
$ smbclient -M 10.32.26.11
Connected. Type your message, ending it with a Control-D
Here begins my test message
I can send several lines
and even press Enter
until I decide to press CTRL+D
sent 111 bytes
$
2)
Error connecting to 192.168.x.x (Connection refused)
This means your samba service is not running or there is a firewall in between.
You can always test this with a "telnet" against the right port:
Samba port is 445 (old days used to be 136/137/138). So you try a telnet to the target IP via the 445 port. If there is something listening there, it will answer you.
I.e: I try to telnet my own PC's samba share:
$ telnet 10.32.26.11 445
Trying 10.32.26.11...
Connected to 10.32.26.11.
Escape character is '^]'.
That's good. I am connected. Something answered so I can guess Samba is running on his default port. Now I stop the samba process. Look what happens:
$ telnet 10.32.26.11 445
Trying 10.32.26.11...
telnet: Unable to connect to remote host: Connection refused
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.