[Samba] How forcly disconnect unwanted user?

Kyle Loree kyle at caisnet.com
Mon Jan 27 22:20:30 GMT 2003

This is straight out of the smb.conf man page from your local mirror of
it might help you.

deadtime (G) 

The value of the parameter (a decimal integer) represents the number of
minutes of inactivity before a connection is considered dead, and it is
disconnected. The deadtime only takes effect if the number of open files
is zero. 

This is useful to stop a server's resources being exhausted by a large
number of inactive connections. 

Most clients have an auto-reconnect feature when a connection is broken so
in most cases this parameter should be transparent to users. 

Using this parameter with a timeout of a few minutes is recommended for
most systems. 

A deadtime of zero indicates that no auto-disconnection should be

Default: deadtime = 0 
Example: deadtime = 15 

Joel at hammershome.com writes:
>I haven't tried this, but you can use smbstatus to get the pid of the smbd
>supplying the services to those users, then kill -15 pid.
>Since the output includes when the connection was made, you could write a
>bash script or whatever and kill connections older than a certain date or
>belonging to certain users.
> Mon, Jan 27, 2003 at 01:41:09PM +0300, óÁÌÔÁÅ? äÅÍÅÎÔÉ  ðÅÔÒÏ?É?
>wrote:tOn Mon, Jan 27, 2003 at 01:41:09PM +0300, óÁÌÔÁÅ? äÅÍÅÎÔÉ 
>ðÅÔÒÏ?É? wrote:
>> Hello Samba Team!
>> I have a Samba fileserver installed on my network. Sometime I have a
>problem. There are some irresponsible users, who holds their network
>connections for no purpose. I want to disconnect forcedly such users .
>But I do not know how do it. Help me, please!
>> Dementiy P. Saltaev,
>> "Svyaztransneft", Volgograd, Russia,
>> 01.27.2003; 13:41.

Kyle Loree
Rendek Communications
Kyle at caisnet.com

More information about the samba mailing list