[SOLVED] Disable Samba Share

Is it possible to disable a Samba share without deleting it? I am in the process of migrating data off of the UCS to a dedicated NAS that is connected to LDAP. I have already rsync’d the data to the NAS, set correct permissions, adjusted GPOs to point to the new shares, etc. However, when I restart, gpupdate /force → restart, clients are still using the original ucs share. I have verified this by creating a zztest.txt file in the share root. My thinking is that if I can disable the share in ucs, windows clients would then look for the share again (same share name, different ip addr, \\Prod → \\Prod). Ideally this would happen with nothing more than a restart.

The reason I’d like to disable and not delete the share is in case anything might go wrong. I’d rather not have to setup those samba shares again as I remember it being kind of a pain…

I have solved this issue. I will describe my method for doing this transfer.

First thing, you can disable writing to the Samba share with the option “Samba write access”. By un-ticking this option, it essentially disables the drive.

Next I removed all GPOs pertaining to Drive Mapping. I then created a GPO to delete the P: and M: drives (the old drives that were pointing to ucs-master). I can then push that group policy update, and restart all devices. After I’ve verified that all the mapped drives were deleted, I can then re-enable the GPOs that map the new drives. Once again, push the group policy update and restart the clients.

This method missed any stragglers that were off or sleeping when I made the change. But disabling write access meant that those clients were much easier to identify.

I don’t think this was the best solution. But it -a- solution, I suppose…

1 Like