samba-users August 2010 archive
Main Archive Page > Month Archives  > samba-users archives
samba-users: Re: [Samba] HOWTO close session(s) to a specific sh

Re: [Samba] HOWTO close session(s) to a specific share from samba server side?

From: Andrew Masterson <Andrew.Masterson_at_nospam>
Date: Thu Aug 12 2010 - 21:28:19 GMT
To: <Volker.Lendecke@SerNet.DE>

> > Unfortunately that closes the entire share, not an individual
connection
> > to that share. I have fought with this before unless I'm missing
> > something.

> If you send that to the target "smbd", yes. You should be
> able to send that to individual service smbds as well.

So something like

smbcontrol `smbstatus -p | grep xxxxx | awk {'print$1'}` close-share
XXXXX

should script nicely. I never thought of doing that...you learn
something new every day.

> > Unlocking files is another impossible task unless (I think) you are
> > brave enough to edit the locks.tdb file.

> Have you looked at "reset on zero vc = yes"?

There are many situations where client Windoze applications lock files
on the network, and you need to unlock them before proceeding with an
update (that can, of course, only be run from another Windoze box).
This can be from machines that don't clear their locks, go to sleep,
people that are logged in and don't log out, whatever the reason. The
only way that I know of with smbd is to kill the process IDs locking the
files before proceeding with the updates.

The option you mention above seems more about machines cleaning up their
dead connections (which is definitely something I need to look into - is
there a reason this is off by default?)

-=Andrew

-- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba