Re: How do you set share permissions using 'net share' command?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Mon, 25 Apr 2005 02:49:01 -0700, Arturo <Arturo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>Is there a parameter available to set the share permissions (Full Control,
>etc) from a command prompt using 'net share'?
>
>net share sharename=d:\folder\subfolder ...

No.

Use RMTSHARE, tip 6353 in the 'Tips & Tricks' at http://www.jsifaq.com

When you look at the net share help (in Windows XP), you receive:

Net shareManages shared resources. Used without parameters, net share displays information about all of the resources that are shared on the local computer.

Syntax
net share [ShareName] net share [ShareName=Drive:Path [{/users:Number | /unlimited}] [/remark:"Text"] [/cache: {manual | automatic | no}]] net share [ShareName [{/users:Number | unlimited}] [/remark:"Text"] [/cache: {manual | automatic |
no}]] net share [{ShareName | Drive:Path} /delete]

Parameters
ShareName
Specifies the network name of the shared resource. Type net share with a ShareName to display information about that share only.
Drive:Path
Specifies the absolute path of the directory to be shared.
/users:Number
Sets the maximum number of users who can simultaneously access the shared resource.
/unlimited
Specifies an unlimited number of users who can simultaneously access the shared resource.
/remark:"Text"
Adds a descriptive comment about the resource. Enclose the text in quotation marks.
/cache:manual
Enables offline client caching with manual reintegration.
/cache:automatic
Enables offline client caching with automatic reintegration.
/cache:no
Disables caching.
/delete
Stops sharing the shared resource.
net help Command
Displays Help for the specified net command.
Remarks
To share a directory with a path that contains a space, enclose the drive and the path of the directory in quotation marks (for example, "C:\Path Name").
When you display all the shared resources on a computer, the share name of each resource, the device names or path that are associated with the resource, and a descriptive comment about the resource appear. The output is similar to the
following:

Sharename Resource Remark
------------------------------------------------------
ADMIN$ C:\WINNT Remote Admin
C$ C:\ Default Share for Internal Use
print$ C:\WINNT\SYSTEM\SPOOL
IPC$ Remote IPC
LASER LPT1 Spooled Laser printer

As you create shares on a server, they are saved. When you stop the Server service, all shares are disconnected, but they are reconnected automatically when the computer is restarted. For more information about services, see Related Topics.
Shared resource names that end in a $ character do not appear when you browse the local computer from a remote computer. For more information, see see Related Topics.
Examples
To display information about shared resources on the local computer, type:

net share

To share a computer's C:\Data directory with the share name DataShare and include a remark, type:

net share DataShare=c:\Data /remark:"For department 123."

To stop sharing the DataShare folder you created in the previous example, type:

net share DataShare /delete

To share a computer's C:\Art Lst directory with the share name List, type:

net share list="c:\art lst"

See tip 2815 for Windows 2000 CMD HELP.

.



Relevant Pages

  • DOS Boot + Access Denied
    ... I am using a standard DOS Network Boot disk. ... I can successfully use the NET USE command to connected ... to a shared resource on a 2003 Server. ...
    (microsoft.public.security)
  • MS 2003 Server Access Denied when using boot disk to access network share
    ... I am using a standard DOS Network Boot disk. ... I can successfully use the NET USE command to connected ... to a shared resource on a 2003 Server. ...
    (microsoft.public.security)
  • Re: Changing Computer Name
    ... Open a command prompt and type the following command: ... Then press Enter and close the command window. ... Windows 2000 on the server, ... Multiple connections to a server or shared resource by the same user, ...
    (microsoft.public.windowsxp.network_web)
  • Access denied in a .jsp
    ... tries to create a file in a shared resource (openned with the "net use" ... command under Windows on a directory on another machine): ... Prev by Date: ...
    (comp.lang.java.programmer)