From: Roel van Meer on
Rob7704 writes:

> Can anyone tell me if the following is possible
>
> I need 2 Samba Shares for example share1 and share2, both sharing an
> identical location, however I want once PC to connect using share1 and
> everyone else to use share2 so far so good this works.
>
> However, at 1am in the morning I want to stop share2 and disconnect users
> whilst not effecting access via share1. Then at 2am restart share2.
>
> From the tests I've done the only way to do this is to copy different
> versions of smb.conf then do a service smb restart, however this disconnects
> the user on share1, trying a service smb reload whilst share2 disappears
> from the network anyone connected to it can still access files.
>
> Can I do this? Is there another way?

I think you might have luck with the command "smbcontrol smbd close-share
share2". You could also forcibly disconnect all users connected to share2.
At the same time, you would need a changed smb.conf to prevent them to
reconnect, like you already have.

Good luck,

roel

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba
From: Rob7704 on

Thanks for the suggestion, it works to a point.

Background information, I'm using CentOS 5.2, running samba, the client
machines are XP Pro.

My script for turning off Share2 is as follows

copy the alternative smb.conf
do service smb reload
then smbcontrol smbd close-share Share2

smbstatus shows only one share running so far so good.

Checking a client PC shows it has been disconnected, but it then reconnects
to Share2 when it's not there??? How is this possible?? A bug in Samba, or a
quirk with XP? I'm really confused.

Thanks

Rob


Roel van Meer-3 wrote:
>
> Rob7704 writes:
>
>> Can anyone tell me if the following is possible
>>
>> I need 2 Samba Shares for example share1 and share2, both sharing an
>> identical location, however I want once PC to connect using share1 and
>> everyone else to use share2 so far so good this works.
>>
>> However, at 1am in the morning I want to stop share2 and disconnect users
>> whilst not effecting access via share1. Then at 2am restart share2.
>>
>> From the tests I've done the only way to do this is to copy different
>> versions of smb.conf then do a service smb restart, however this
>> disconnects
>> the user on share1, trying a service smb reload whilst share2 disappears
>> from the network anyone connected to it can still access files.
>>
>> Can I do this? Is there another way?
>
> I think you might have luck with the command "smbcontrol smbd close-share
> share2". You could also forcibly disconnect all users connected to share2.
> At the same time, you would need a changed smb.conf to prevent them to
> reconnect, like you already have.
>
> Good luck,
>
> roel
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
>
>

--
View this message in context: http://old.nabble.com/Is-this-possible--tp28416221p28464048.html
Sent from the Samba - General mailing list archive at Nabble.com.

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba