David Lee t.d.lee at
Sat Jan 26 06:17:01 GMT 2002

On 25 Jan 2002, Scott Gifford wrote:

> David Brodbeck <DavidB at> writes:
> > Couldn't you write your own versions of 'shutdown' and 'wall' that
> > are Samba-aware, and called whatever Samba-wall script you're
> > already using?  In the case of 'wall' it could just be a wrapper
> > around the existing binary.  shutdown is a slightly more complex
> > problem, but a Perl script that did the timing and notification,
> > then called the existing shutdown to request an immediate shutdown
> > when it was done seems like it'd work.
> Better yet would be writing a daemon that opened up a psuedo-TTY,
> wrote an entry into utmp and friends, and then ran the Samba-wall
> script whenever it received a message on that TTY.
> Or something like that...

Indeed. Andrew B. has suggested this general sort of mechanism.

One possibility is something like:

1. move "utmp" code (to which I have a fond attachment!) out of samba into
   a general-purpose "umtp" PAM module;  this has much to commend it anyway;

2. allow smbd to register itself with PAM (hence with the PAM/utmp above);

3. a daemon to create/monitor the pseudo-ttys (or "lines") from PAM/utmp;

4. something (or more) to listen on those PAM/utmp lines/pttys and to
   generate WinPopups onto the corresponding "host" (SMB client);

5. a mechanism for smbd itself to be such an "application" (i.e. so that
   simple-text messages it generates find their way to the SMB client
   as WinPopups);

Note that one possible downside to be considered is handling systems which
don't use PAM.  But this needn't be a show-stopper for PAM systems. 

Lots of handwaving and vaguary there!  But does that seem generally sort
of OK-ish?


:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:            South Road            :
:                                           Durham                :
:  Phone: +44 191 374 2882                  U.K.                  :

More information about the samba-technical mailing list