[Samba] Re: Winpopup message to all user on a PDC

Thomas Bork tombork at web.de
Tue Jul 1 17:42:22 GMT 2003


Hi Mike,

> Except.. Most of my net sends don't end up working.. They fail unless I
> explicitly do a nmblookup and specify the broadcast to find that
> computer..
[...]
> Seeing how im dealing with the entire contents of 10.x.x.x  around
> 20,000 computers that I may have to contact for some reason.. Its easy
> for me to know there netbios name.. As its there login name.. However
> there subnet is a whole different ballgame.. Im hoping it will clear up
> after browse lists have propagated in a few days.. But if you have any
> ideas let me know..


if your PDC is an Linux-Samba-Server and the clients have active connections:

int_samba_version=`smbd -V | cut -d" " -f2`

status=`smbstatus -b \
               | grep -vi "Samba version $int_samba_version" \
               | grep -vi "PID     Username  Machine                       Time logged in" \
               | grep -vi "-" | grep '[1-9]' | cut -c19-48`

if [ "$status" = "" ]
then
       echo
       echo "No Samba Client activ"
       echo
       exit 1
else
       echo
       for i in $status
       do
              echo sending message to "$i" ...
              echo $message|smbclient -U "eisfair Samba Server" -M "$i" 1> /dev/null
              if [ "$?" != "0" ]
              then
	     echo
	     echo "Sending Message to $i failed!" br x br
              fi
       done
fi


der tom
______________________________________________________________________________
UNICEF bittet um Spenden fur die Kinder im Irak! Hier online an
UNICEF spenden: https://spenden.web.de/unicef/special/?mc=021101




More information about the samba mailing list