How to stop access to a share in the samba server?

Michel Applaincourt Michel.Applaincourt at
Sun Nov 29 08:49:31 GMT 1998

Roberto Joao Lopes Garcia wrote:
> At 12:47 26/11/98 +0000, you wrote:
> >> Is there any away to stop access to a mounted SAMBA driver?
> >Have You tried to kill the corresponding smbd-processes? This should
> >disconnect the Users and when they reconnect, the share shouldn't be
> >accessible anymore.
> >
> Thank You to respond, and let me abouse you a litle more ...
> Yes, I know this will work but I have 86 Pcs mount 5 shares eache!
> I could be able to stop just one share and leave the others OK! So I
> kill all the smbd-processes and let the user reconect again? Could the
> users loose same data with this aproach?

one tip I use here, so I don't have to kill and restart SAMBA, is :
the directories where the share points are only symlinks to a true
directory contening the data....
When I want to stop the users to access the share, I simply change the
symlink to point to a directory containing only a file telling that share
is temporaly offline....
And  when I want to give them access to the directory again, I change the
symlink to point to the true directory....

Of course I made 2 little sh scripts to change the symlinks that I name
[share].in and [share].out....

This is only a trick, but I think that it would be cool to have a similar
functionnality in Samba : opening and closing shares without having to
restart or why not reload configuration without having to restart the

    Michel  APPLAINCOURT     | E-mail : michel.applaincourt at
 Computer Sciences Assistant | Phone  : 32 65 373498 
 Universite de Mons-Hainaut  | Fax    : 32 65 373318

                          [Sad...But True]

More information about the samba mailing list