S
S
severnik2020-07-11 09:02:18
System administration
severnik, 2020-07-11 09:02:18

Is there any way to enable/disable shares in Windows Server 2012 r2 without deleting and re-creating them?

Faced with the fact that it is necessary to make shared resources unavailable from time to time. In Linux, this is simply done with one line in the smb config. I don’t want to delete and create balls again, changing access rights every time is also not an option.
Is there any other way to enable/disable Win Server 2012 r2 shares?
How about this in 2019 server?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Andrey Ermachenok, 2020-07-11
@eapeap

changing permissions every time is also not an option

Why? Create a group "Shary_tuda-siuda", put non-admins in it, and deny members access if needed. Their ball will be empty. What is the problem?

O
oia, 2020-07-11
@oia

Or editing the registry with replacing the path to the ball and restarting the service, or as above. But restarting the service breaks the connection to other balls

S
Saboteur, 2020-07-11
@saboteur_kiev

I don’t want to delete and create balls again, changing access rights every time is also not an option.

And why actually?
In Linux, this is simply done with one line in the smb config.

Well, with this line the ball is created or deleted, why don’t you want to do the same in Windows, only in two lines?

A
Artem @Jump, 2020-07-11
Tag

I do not want to delete and create balls again
So you do not delete the files, just turn off the sharing of the folder.
Why delete something???
changing permissions every time is also not an option
Why?
Strange statement of the question - it seems that there is a task and it needs to be done, but in principle you exclude regular methods of solving the problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question