I have multiple shared folders on server (windows server 2008) which are shared for multiple users.
My problem is I want to add give access of few folders to newly created domain user.
Now there are two things that I have noticed
1. Security tab: I am able to add user to to that red line using following command:
icacls d:\TestFolder /grant:r "username":(OI)(CI)F /T
and I can remove user from that list by using following command:
icacls d:\TestFolder /remove:g Administrator /T
2. Sharing tab: Not able to add here.
By using above command, user is not get added to sharing tab.
So, I tried following command:
net share Docs=d:\TestFolder /grant:username=F
Note: The image shows that folder has access to everyone, but this is just testing folder image, not from actual server. So the folder will not have access to everyone.
Apart from above command I tried with SubInACL.exe:
subinacl /verbose=1 /share d:\TestFolder /grant=username=f
But this command also add user to security tab not in sharing tab.
Please help me to find the command or let me know if it is possible or not using command line.