adsi - creating a share and modifying permissions 
Author Message
 adsi - creating a share and modifying permissions

the following example works well for me:

Set fserv = GetObject("WinNT://{server}/lanmanserver")
Set newshare = fserv.Create("fileshare", "test")
newshare.Path = "d:\test"
newshare.setinfo
Set newshare = Nothing

what i would like to do is adjust the permissions of this share.  could some
one please point me in the right direction for this information?

thanks,

bhay



Mon, 05 Mar 2001 03:00:00 GMT  
 adsi - creating a share and modifying permissions
If you have ntfs, you can change your file permissions for example with
cacls.exe or xcacls.exe (Resource Kit utility) as follows:

Status = WShell.Run(Echo Y|CACLS <directory or a filename>  / T /C /G
<user>:perm )
if Status <> 0 Then
    Wscript.Echo "Error setting ACL ..."
end if

Harri

Quote:

>the following example works well for me:

>Set fserv = GetObject("WinNT://{server}/lanmanserver")
>Set newshare = fserv.Create("fileshare", "test")
>newshare.Path = "d:\test"
>newshare.setinfo
>Set newshare = Nothing

>what i would like to do is adjust the permissions of this share.  could
some
>one please point me in the right direction for this information?

>thanks,

>bhay



Mon, 05 Mar 2001 03:00:00 GMT  
 adsi - creating a share and modifying permissions
Hi,

You might want to check out my company's product named XLNT.  XLNT is a
Command and Scripting Language for NT/9x systems.  XLNT also supports
ActiveX Scripting and can be used inconjunction with WSH and/or IIS.  For
your specific question, under XLNT, the syntax would be:

$ SET PERMISSION/OBJECT=SHARE  \\server\test
/ACCOUNT=(account:permissions,...)
where:
account is an NT account name (domain\name syntax also supported) and
permissions for this object is: FULL, READ, CHANGE, NOACCESS or special
access (RWXDPO).

For a free 30-day full-function kit, please visit our web site at
http://www.advsyscon.com.

--

Advanced Systems Concepts, Inc.
Makers of XLNT - Command and Scripting Language for NT/9x
and BQMS - fully distributed Batch Job Queue Management System for NT/9x
http://www.advsyscon.com



Quote:
> the following example works well for me:

> Set fserv = GetObject("WinNT://{server}/lanmanserver")
> Set newshare = fserv.Create("fileshare", "test")
> newshare.Path = "d:\test"
> newshare.setinfo
> Set newshare = Nothing

> what i would like to do is adjust the permissions of this share.  could
some
> one please point me in the right direction for this information?

> thanks,

> bhay



Mon, 05 Mar 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Creating a share with share permissions

2. How can I set permission on a share using VB/ADSI

3. Use ADSI to get share PERMISSIONS

4. Trying to handle share and local permissions using ADSI 2.5

5. creating a remote share thru ADSI+VBS

6. Creating shares & setting permissions on folders

7. Create Share w/ Permissions

8. Create Share - Set Permission HOWTO ?

9. enumerating shares and share permissions with vbscript

10. share permissions and enumerating shares

11. List shares and share permissions?

12. Modify folder and file ACL, and ADSI tutorials

 

 
Powered by phpBB® Forum Software