[Samba] ShowMessage (second attempt)

Thomas Bork tombork at web.de
Thu May 22 20:29:44 GMT 2003


Hi Ow Mun Heng,

you wrote:

> PS: someone just needs to write a script to grep the users (from
> smbstatus output, 1st column) and then send the message. Seems like a
> good idea to me. I'll toy with it see if I can get anywhere.

I attach a script which only works under some special circumstances:

-
smb.conf is in /etc (it was enough for me)
-
you have a tool /usr/local/bin/netcalc for calculating broadcast
adresses (it is from Frank Meyer - www.fli4l.de)
-
you have a script /var/install/bin/anykey with the simple function

echo -e "Press ENTER to continue \c"
read a
exit 0
-
you defined all interfaces for samba in the interface line of smb.conf
with leading
interfaces = 127.0.0.1/8
-
the netbios name of the samba machine is available in $HOSTNAME


I use this in the samba package for eisfair (www.eisfair.org) for:
-
sending start messages from samba to all smb hosts (calling the script
via /etc/init.d)
-
sending stop messages to all/active smb hosts (calling the script via
/etc/init.d)
-
sending messages interactiv to all/active/special smb hosts on console
-
sending messages interactive for delayed shutdowns of samba for
maintenance via a script, which calls this script on console


It is really not perfect but works for me  ;)


der tom


More information about the samba mailing list