Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing net share permissions from command line ?

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
IL
HI,

Is the a way for changing net share permissions from command line ?
net share will not enable me setting "Full" access rights to "Everyone".
thanks

Long live king Moshiach !
 
Use "cacls" to set or remove any file and folder permissions from the command prompt.





----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
You may also want to download RTMShare.exe from Microsoft. It was included in the Windows NT 4.0 Resource Kit. You should be able to accomplish what you are looking to do with this utility.

- Useful Resource Kit Utilities for Domain Administrators


- JSI Tip 6353. RMTShare.exe is in the public domain.


- How can I modify share permissions from the command line?


Joey
CCNA, MCSA 2003, MCP, A+, Network+, Wireless#
 
cacls is used to modify the NTFS file system permmissions. To modify the network sharing permissions, use net share with the /grant option. Type net help share at the command line for other options.
 
thanks,will try both

However I do not see any "grant" option in net help share:

net help share

The syntax of this command is:


NET SHARE
sharename
sharename=drive:path [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Documents| Programs | None ]
sharename [/USERS:number | /UNLIMITED]
[/REMARK:"text"]
[/CACHE:Manual | Documents | Programs | None]
{sharename | devicename | drive:path} /DELETE

NET SHARE makes a server's resources available to network users. When
used without options, it lists information about all resources being
shared on the computer. For each resource, Windows reports the
devicename(s) or pathname(s) and a descriptive comment associated with it.

sharename Is the network name of the shared resource. Type
NET SHARE with a sharename only to display information
about that share.
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 can
simultaneously access the shared resource
/REMARK:"text" Adds a descriptive comment about the resource.
Enclose the text in quotation marks.
devicename Is one or more printers (LPT1: through LPT9:)
shared by sharename.
/DELETE Stops sharing the resource.
/CACHE:Manual Enables manual client caching of programs and documents
from this share
/CACHE:Documents Enables automatic caching of documents from this share
/CACHE:programs Enables automatic caching of documents and programs
from this share
/CACHE:None Disables caching from this share

NET HELP command | MORE displays Help one screen at a time.



Long live king Moshiach !
 
HI,

tried out the cacls command.
It changes only the Windows level permissions,but not the share permissions ....
I need help.
thanks

Long live king Moshiach !
 
It seems that I was looking at Vista when I mentioned the /grant switch earlier. There doesn't seem to be any built-in way from comannd line without a 3rd party utilility like this
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top