net send problem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

net send problem

Pascal Legrand
hello
i've got a problem with the "message command "option
here is my config in smb.conf
message command = /usr/local/samba/var/popup/get_popup "%f" "%t" "%s" "%I" &

and the get_popup script

date=`date +%d-%m-%Y`
heure=`date +%H:%M`
machine=$1
destinataire=$2
message=`cat $3`
ip=$4
infos=`/usr/local/samba/bin/nmblookup -A $ip | grep "<03>"`

echo Le $date a $heure la machine $machine a envoye le message suivant : >>
/usr/local/samba/var/popup/popup.txt
echo $message >> /usr/local/samba/var/popup/popup.txt
echo a destination de $destinataire >> /usr/local/samba/var/popup/popup.txt
echo $infos >> /usr/local/samba/var/popup/popup.txt
echo "*****************************************************************" >>
/usr/local/samba/var/popup/popup.txt


when i send a message only to the server i can get the message and all the information in popup.txt,
but when i send a message to all the domain it doesnt works
is somebody got an explication

thank you and sorry for my poor english
--
----------------------------------------------------
Pascal Legrand
*IUT de Chartres* - _Service Informatique_
----------------------------------------------------

1, place Roger Joly
(/anciennement/ /place/ /Pierre/ /Mend├Ęs/ /France/)
28000 Chartres

Tel : 02 37 91 83 36 - Fax: 02 37 91 83 01
courriel : [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: net send problem

Andrew Bartlett
On Mon, 2005-11-14 at 15:14 +0100, Pascal Legrand wrote:
> hello
> i've got a problem with the "message command "option
> here is my config in smb.conf
> message command = /usr/local/samba/var/popup/get_popup "%f" "%t" "%s" "%I" &

> when i send a message only to the server i can get the message and all the information in popup.txt,
> but when i send a message to all the domain it doesnt works
> is somebody got an explication

When a message is sent to * or the domain it uses a completely different
transport (a broadcast udp datagram) to that used for single-host
communication (a command on a CIFS session).  Samba doesn't listen for
the UDP broadcasts.

I found this out when trying to catch the little blighters who were
sending rude (and they thought anonymous) messages to everybody on the
network.  In the end, I just shut down the messenger service on every
machine, but the other option would have been a targeted analysis of the
broadcast traffic with ethereal, or a hook in nmbd.

Andrew Bartlett

--
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Student Network Administrator, Hawker College  http://hawkerc.net

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: net send problem

Christopher R. Hertel
On Tue, Nov 15, 2005 at 08:14:13AM +1100, Andrew Bartlett wrote:

> On Mon, 2005-11-14 at 15:14 +0100, Pascal Legrand wrote:
> > hello
> > i've got a problem with the "message command "option
> > here is my config in smb.conf
> > message command = /usr/local/samba/var/popup/get_popup "%f" "%t" "%s" "%I" &
>
> > when i send a message only to the server i can get the message and all the information in popup.txt,
> > but when i send a message to all the domain it doesnt works
> > is somebody got an explication
>
> When a message is sent to * or the domain it uses a completely different
> transport (a broadcast udp datagram) to that used for single-host
> communication (a command on a CIFS session).  Samba doesn't listen for
> the UDP broadcasts.
>
> I found this out when trying to catch the little blighters who were
> sending rude (and they thought anonymous) messages to everybody on the
> network.  In the end, I just shut down the messenger service on every
> machine, but the other option would have been a targeted analysis of the
> broadcast traffic with ethereal, or a hook in nmbd.

Samba does listen on the correct UDP port, but it isn't listening for
those particular message types.  That's a very, very old mechanism...

Chris -)-----

--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   [hidden email]
OnLineBook -- http://ubiqx.org/cifs/    -)-----   [hidden email]