Poll: Was this script useful

Be advised that this is a public poll: other users can see the choice(s) you selected.

+ Post New Thread
Results 1 to 5 of 5
Scripts Thread, Setting user share NTFS permissions en masse in Coding and Web Development; This script is a development of a piece of work by ChrisH. You need to extract the files and edit ...
  1. #1

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    Boston, MA
    Posts
    7,601
    Thank Post
    110
    Thanked 771 Times in 599 Posts
    Rep Power
    183

    Setting user share NTFS permissions en masse

    This script is a development of a piece of work by ChrisH.

    You need to extract the files and edit the script so that it knows where your user shares are and what permissions to give out. It assumes that the folder names are the same as the usernames.

    The script runs through all the folders setting permissions and ownership on the files/folders within.

    I ACCEPT NO RESPONSIBILITY IF THIS SCRIPT BUGGERS ANYTHING UP SO TEST THOROUGHLY!
    Attached Files Attached Files

  2. #2
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,007
    Thank Post
    124
    Thanked 286 Times in 263 Posts
    Rep Power
    109

    Re: Setting user share NTFS permissions en masse

    Needs some constants in it for some of the settings I reckon

    My add user script needs a bit of development as well if your in the scripting mood Ric

  3. #3

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    Boston, MA
    Posts
    7,601
    Thank Post
    110
    Thanked 771 Times in 599 Posts
    Rep Power
    183

    Re: Setting user share NTFS permissions en masse

    @ChrisH: You wrote it (for your adduser script), I just hacked it and refined it for use on previously created folders.

    I spose I could add the constants but I know that this definately works... as opposed to maybe working if I tinker too much.

  4. #4

    Join Date
    Feb 2006
    Posts
    1,187
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Setting user share NTFS permissions en masse

    Quote Originally Posted by Ric_
    I spose I could add the constants but I know that this definately works... as opposed to maybe working if I tinker too much.
    Spoken like a true admin

  5. #5
    sahmeepee's Avatar
    Join Date
    Oct 2005
    Location
    Greater Manchester
    Posts
    795
    Thank Post
    20
    Thanked 70 Times in 42 Posts
    Rep Power
    34

    Re: Setting user share NTFS permissions en masse

    blimey! All that vb seems a bit longwinded to me! Mine's a windows batch file:

    Code:
    for /f "Tokens=*" %%i in ('dir /b /ad "E:\year7\"') do subinacl /subdir "E:\year7\%%i\*.*" /setowner=mydomain\%%i
    (one line per parent folder) to do the ownership. It could be tweaked easily to take an argument on the commandline, but I feel safer using hard-coded values. You need to use a recent version of subinacl (mine is 5.2.3790.1180)

    To give the folder's owner NTFS full control, I do:

    Code:
    for /f "Tokens=*" %%i in ('dir /b /ad "\\myserver\year7\"') do @cacls "\\myserver\year7\%%i" /E /T /G "mydomain\%%i":f
    Having them separate is handy because it can take a long time to run these through.



SHARE:
+ Post New Thread

Similar Threads

  1. User areas + User share permissions.
    By Dos_Box in forum Windows
    Replies: 6
    Last Post: 11th September 2007, 12:17 PM
  2. GTK restrict drives and NTFS permissions
    By CyberNerd in forum Thin Client and Virtual Machines
    Replies: 2
    Last Post: 11th May 2007, 06:32 PM
  3. Mass setting NTFS permissions
    By localzuk in forum Windows
    Replies: 7
    Last Post: 8th January 2007, 05:23 PM
  4. Replies: 4
    Last Post: 23rd November 2006, 10:33 PM
  5. Non-tech staff setting share permissions
    By ITWombat in forum How do you do....it?
    Replies: 26
    Last Post: 18th July 2006, 11:23 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •