[Samba] deny new connections

Thomas Schulz schulz at adi.com
Fri Mar 7 19:08:05 MST 2014


> Hi people,
> 
> I was wondering: is it possible to deny all new connections to samba,
> but keep the current connections working ?
> 
> We have some applications running from a samba share. To update the
> application everybody needs to close it.
> Since we have almost 1000 concurrent users, 24/7, it is difficult to
> keep them out.
> My solution now is:
> 
> -          Communicating the downtime and provide a time window in
>            which users cannot access the application
> 
> -          In that time window: checking smbstatus for who is still
>            logged in, phone them, and ask to quit the app
> 
> -          Change smb.conf to only allow my IP address, restart smb
> 
> -          Update
> 
> -          Restore original config and restart
> 
> Big culprit in this method is that sometimes users start the
> application while I stop or restart samba.
> This often causes data-file corruption; the apps are very sensitive to
> that .
> 
> It would be very handy to deny new connections, but keep current
> connections (new file locks included) working.

When you edit the smb.conf file the running smbd program is supposed to
notice that within a minute and adopt the changes. Perhaps your method
of editing the smb.conf file would work if you did not stop and restart
samba.

Tom Schulz
Applied Dynamics Intl.
schulz at adi.com


More information about the samba mailing list