[Samba] reload smb.conf & terminate connections

Martin Rasp mrasp at web.de
Fri Nov 22 00:10:01 GMT 2002


> On Thu, 2002-11-21 at 10:02, Martin Rasp wrote:
> > I'm developing a command line tool (a GUI is following) for easily
> > sharing local directories as an unprivileged user.
> >
> > After adding shares smbd reloads its config file (via SIGHUP). Under
> > Windows new shares appear immediately. If removing a share, samba
> > reloads the smb.conf but it has no effect on established connections. I
> > can still access the share even though it has been removed.
>
> I think this falls under the long-standing bug in our loadparm code.  We
> don't remove settings on SIGHUP, just change settings.  There is no way
> to forcibly disconnect shares at the moment, but you can set 'available
> = no' to disable future access to shares that were in the smb.conf that
> an smbd had read.  (IE, don't remove the share, just add 'available =
> no' to each share).  That will prevent *new* connections to that share
> without disconnecting existing users.

Well, I'd rather remove the entries out of smb.conf. Otherwise it is more 
difficult for my program to find out whether a share name is already used 
or not.

It would be better if I could find out active connections to the (deleted) 
share (like smbstatus does) and really kill them with SIGKILL. Of course 
the side effect would be that other connections to the concerning client 
were killing, too, because it's the same PID :-(

Probably I should ask in the developer mailing list for further details on 
programming such a thing ...

Thanks so far.

Martin Rasp
-- 
http://www.linux-fuer-alle.de/




More information about the samba mailing list