[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Send message on ppp going up|down [was Re: Install just samba client?]



OK next question :)

What I want to configure is for Wendolene [the OpenBSD box] to send a 
message to select Windows clients whenever the PPP link goes up or down.

Looking through the ppp(8) man page I thought of using 
/etc/ppp/ppp.link<up|down>, something like:

<ppp.conf label>:
        !bg /bin/cat /etc/ppp/ppp.linkdown.msg | tee | \
                /usr/local/bin/smbclient -U wendolene \
                -M <target's NetBIOS name> -I <target's IP address>

This is not causing a SMB message to be sent, however. Is my shell scripting 
awful, or am I misunderstanding the usage of /etc/ppp/ppp.link<up|down> ?

The other alternative I guess is to schedule a shell script using pppctl(8) 
via cron, but this seems very messy and unnecessary if the ppp.link<up|down> 
files are parsed precisely when I want an action to occur.

Any advice will be gratefully appreciated.

Damon

------------------------------

Jarred,

Thanks for the response - all spot-on, except a WINS server isn't required, 
so long as the -I switch is used, i.e.:

  smbclient -M <NetBIOS name> -I <IP-address>

and, of course, a corresponding rule in pf.conf:

  pass on $int_if proto tcp from ($int_if) to $int_if:network port 139 flags 
S/SA keep state

Thanks again for your help,
Damon

------------------------------

Date: Thu, 28 Aug 2003 00:33:23 -0600
From: jared r r spiegel <jrrs@ice-nine.org>
To: misc@openbsd.org
Subject: Re: Install just samba client?
Message-ID: <20030828063323.GC3163@ice-nine.org>

On Thu, Aug 28, 2003 at 11:55:43AM +1000, Damon McMahon wrote:

>I would like Wendolene to be able to message Windows clients on the subnet 
>using
>
>smbclient -M
>
>from the samba package, but due to space (primarily) and security issues I 
>do *not* want to install the entire samba package.

  you could untar:

/usr/local/bin/smbclient
/etc/samba/smb.conf

  and it would work if your smb.conf pointed to a valid WINS server.
  ( you'll get gripes about missing codepages without the codepages
    from the tgz in /usr/local/lib/samba/codepages )

  if any of your windowses are able to provide WINS serverness, that
  would be the way to go( HDD space-wise ), probably.

  if its a bunch of unruly w95 machines, you'd likely be running
  at the very least nmbd; nor sure if nmbd will run w/o smbd also;
  but smbclient -M <IPAddr> instead of smbclient -M <NetBIOS-Name>
  from here at the moment is failing with "session request failed",
  whereas w/<NetBIOS-Name> is succeeding ok with just the two files
  listed above present and accounted for ( because different machine
  is WINS server ).

_________________________________________________________________
ninemsn Extra Storage is now available. Get five times more storage - 10MB 
in your Hotmail account. Click here  http://join.msn.com/