[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Disable a file share

Posted on 2005-04-29
10
Medium Priority
?
186 Views
Last Modified: 2010-04-12
Hi,

I would like to temporarily disable a file share.  Users at workstations connect to a file share and open a file.  This connection needs to be closed before a nightly job runs.  So, I would like to run a scheduled job to disable/re-enable the share.  (I don't what to lose the security privelages that are associated with the share, or I'd like to easily reset them...)

Net Share ???

0
Comment
Question by:a222493
  • 4
  • 2
  • 2
  • +1
10 Comments
 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 13895893
Any particular reason you're using share level permissions?
0
 
LVL 97

Expert Comment

by:Lee W, MVP
ID: 13895921
If you forget about share level permissions and stick to NTFS permissions, you won't have problems.
0
 
LVL 16

Expert Comment

by:robrandon
ID: 13897833
What about restarting the workstation service?  I think that will drop all the connections to the server, but I'm not 100% sure on that.
0
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

 
LVL 16

Expert Comment

by:robrandon
ID: 13897836
Server Service.
0
 
LVL 8

Accepted Solution

by:
Leandro Iacono earned 375 total points
ID: 13898988
You could do this with Net Share Command...

http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/ServerHelp/e353ec49-e1c2-46b3-b294-69f885774c8c.mspx

Possibly create a script and schedule it to run a specific hours?

Good luck mate ...

UICE
0
 
LVL 16

Expert Comment

by:robrandon
ID: 13910782
You can also try the NET SESSION command.

0
 

Author Comment

by:a222493
ID: 13910846
How could I use NET SESSION?
0
 
LVL 16

Assisted Solution

by:robrandon
robrandon earned 375 total points
ID: 13911385
Net session will disconnect the computers that are connected through your file shares.

I believe you can invoke NET SESSION /D and it will close all of the open session.  You would then have to schedule that command to run at whatever time you want.
0
 

Author Comment

by:a222493
ID: 14012025
I hadn't checked, but we were not using share permissions, so I was able to use net share /delete.  Then for good measure, I used the NET SESSION /D to get rid of any locks.  For auditing purposes, I used NET FILE which lists everyone connected...
0
 
LVL 8

Expert Comment

by:Leandro Iacono
ID: 14014991
Glad we could help you out mate :D
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
If anyone asked you to network diagram of the internet, it was drawn in the form of a fluffy cloud which further became known as cloud computing. Popularly cloud computing is defined as workloads that run over the internet in a commercial provider’s…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question