Create network shares via command line with specific permissions

Posted by Derek on Super User See other posts from Super User or by Derek
Published on 2012-05-02T13:00:37Z Indexed on 2012/12/09 23:23 UTC
Read the original article Hit count: 229

This is sort of a two-pronged question.

I am developing an application that will need to be able to create network shares in Windows Server 2003 via the command line. So, firstly, how do I create shares in Windows via the command line? I tried researching it, and all I was able to find is that I should be using net, but other than that, there isn't much documentation.

Also, in this share there will be a few directories with the names of users on the domain, and I would like for the directories to not be readable or writable by anyone else. For example, say I have two directories: jsmith and jdoe. I would like the user jsmith to write and read from the directory jsmith, but not the directory called jdoe, and vice versa.

© Super User or respective owner

Related posts about command-line

Related posts about network-shares