# restarting samba for just one share possible ?

## javeree

When I boot my system, I share some drives to my network. 

Apart from this, I have an encrypted filesystem that I have to unlock manually and then share. the decrypted filesystem is accessible through /mnt/decrypted.

So after I start, samba is just sharing /mnt/decrypted, which is an empty directory.

Then I decrypt => decrypt encrypted_FS /mnt/decrypted

When I ls /mnt/decrypted locally, I see the decrypted files. When I look at the samba share, I still see the empty directory.

In order to make the decrypted files available, I need to 'refresh' the samba share /mnt/decrypted. Actually, this means release the link that samba has to the lower lying /mnt/decrypted and relink to the system that is mounted on top of it.

However, the only way I found to do this is to restart samba completely /etc/init.d/samba restart.

Restarting samba also means all other shares are temporarily interrupted, possibly breaking the connections of other users.

So my question is if there is a way for samba to 'restart' a single share, something like 'samba --reload /mnt/decrypted'.

Alternatively, would there be a way to specify a samba share in such a way that samba automatically displays the topmost mounted filesystem of a certain directory ?

----------

## vaxbrat

It's a bit of work each time, but you could comment out the share in the smb.conf file each time before you reboot.  Then do you decrypt/mount, uncomment and then do an "/etc/init.d/samba reload".  That should start the share without booting off existing share users.

----------

## vaxbrat

Also if you look into using swat to do your samba admin from a web client, you should be able to do all of this from it.  I never use it because it can tend to clobber manual settings that I have to do when dealing with life as an active directory domain member.

----------

