+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 37
Scripts Thread, Help with Scripts to create Share folder per User and create permissions for it in Coding and Web Development; OK, here is a modified version of your script. Look through it, I have added 'EDIT -- notes through for ...
  1. #16
    themightymrp's Avatar
    Join Date
    Dec 2009
    Location
    Leeds, West Yorkshire
    Posts
    941
    Thank Post
    177
    Thanked 179 Times in 154 Posts
    Rep Power
    43
    OK, here is a modified version of your script.

    Look through it, I have added 'EDIT -- notes through for where I've changed things. Most of the problems were down to an extra speechmarks in one line.

    A point of note, is your network domain hicis.local OR hicis.com?? You are inconsistent in the script so these need to be checked and altered correctly. I have also changed a few bits that are specific to our network that you don't need.

    Double check your group names and OU structure as it may not match ours.

    Also, are you using a good editor for this? Such as Dreamweaver or Notepad+ ? These tools colour code the script and make it much easier to spot errors. For example, the extra speechmarks was a quick spot as everything below it was green in stead of a mix of colours.

    Have a look and see if you can follow it
    Attached Files Attached Files

  2. Thanks to themightymrp from:

    zooroo44 (28th June 2011)

  3. #17
    themightymrp's Avatar
    Join Date
    Dec 2009
    Location
    Leeds, West Yorkshire
    Posts
    941
    Thank Post
    177
    Thanked 179 Times in 154 Posts
    Rep Power
    43
    @zooroo44 how are you getting on?

  4. #18

    Join Date
    Jun 2011
    Location
    zooroo44
    Posts
    19
    Thank Post
    8
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    dcdnsdhcpwds20110628174.png

    The Script is working and tell me that so fare so good but in the AD



    dcdnsdhcpwds20110628180.png
    this is the only user created
    and in File Share "Web" there is no folder Created in "C:\e\student"


    i Attach the file i use
    and thanks for help
    Attached Files Attached Files
    Last edited by zooroo44; 28th June 2011 at 05:30 PM.

  5. #19

    Join Date
    Jun 2011
    Location
    zooroo44
    Posts
    19
    Thank Post
    8
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    DC,DNS,DHCP,WDS-2011-06-29-00-52-26.png
    Now i Made the necessary adjustments on the servers and made the hidden shares and all set but i get permission error while the script running i checked the Active directory btw the way i use test VMS to run the script on and i made the share's on C drive , the user is created and added to group but it stops on line 136 "the line that creates the folders" i removed the read only form the folder and i checked i m running the script with admin credit
    So i need you to check with me again on the creating and sharing part of the script.

  6. #20

    Join Date
    Jun 2011
    Location
    zooroo44
    Posts
    19
    Thank Post
    8
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    i try some thing else and this is the result


    and this is copy of the Script after all thing
    it Create First user jojo.dem and make the Share folder on "Web" but stop like you see in there

    thanks for your time

  7. #21
    themightymrp's Avatar
    Join Date
    Dec 2009
    Location
    Leeds, West Yorkshire
    Posts
    941
    Thank Post
    177
    Thanked 179 Times in 154 Posts
    Rep Power
    43
    Any chance you can post your lastest version of the script on here? Mediafire is blocked at our school by the LEA Just click the 'Go Advance' button at thye bottom right and you can add attachments.

    Cheers

    Oh and well done for getting this far!

  8. #22

    Join Date
    Jun 2011
    Location
    zooroo44
    Posts
    19
    Thank Post
    8
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    This is the Script
    3333333333333..vbs

  9. #23
    themightymrp's Avatar
    Join Date
    Dec 2009
    Location
    Leeds, West Yorkshire
    Posts
    941
    Thank Post
    177
    Thanked 179 Times in 154 Posts
    Rep Power
    43
    OK, I have made a couple of small changes.

    At lines 156 and 157 you are adding share permissions for EVERYONE with Full Control and ADMINISTRATORS with Full Control. Only the EVERYONE part is needed in this instance as the Administrators are part of the EVERYONE group. I have removed the extra bits.

    Secondly, on lines 99 and 114 you have the word 'profilf$' - should this say 'profile$' ? I didn't change it in case it was on purpose.

    The rest of the script looks right. The error message at the end of your video is to do with trying to find another line in the CSV file. Do you have a blank line in the file anywhere? If not, try it with 2 test accounts in the CSV instead of just 1. My early versions of the script had a problem with having an odd number of people but worked fine with even numbers. The problem may have resurfaced here?

    If you have any other problems with permissions then it is likely to be the permissions on the drive f$ as opposed to a problem in the script. Just check it.

    One last thing, are your OU's set up the same as mine? I have once called 'Network Users' and within that I have a 'Students' and 'Staff' OU. Within the students OU is a seperate one for each year group. You may need to make some alterations to match your exact setup. Also, there is still a mention in the script of the security group 'staffsnap'. You WON'T have this, it is unique to our system as we used to have something called a SNAP Server.

    Cheers
    Attached Files Attached Files

  10. #24

    Join Date
    Jun 2011
    Location
    zooroo44
    Posts
    19
    Thank Post
    8
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Post

    Hello man I can't say how much you help me
    Finally the Script is Worked there were a same name in all users "jojo" when I change it to deferent names
    The Script work like magic
    BUT
    Fist of all the Users is not in the Domain I don't know why and this is Account like in photo A
    and when I try to log in with any user after I complete his information it can't access the Profile folder
    I don't know why
    this is the Share folder look's like in The "Web" server and Can I make the Script make a map Drive to
    the share folder for the Users I will make 1000 user it can't be I will Put the Map drive manual and I need to
    set the permission on the Share folder to the User who own the folder and Admin only
    sorry your time I appreciate it so much
    Thanks a lot
    I attach The final Ver of The Script and the Users file

    WinXP Pro_1-2011-06-29-15-36-45.pngWEB,FILE,WSUS-2011-06-29-14-45-23.pngVIS2.vbsDC,DNS,DHCP,WDS-2011-06-29-15-06-50.pngDC,DNS,DHCP,WDS-2011-06-30-12-43-05.png

    Thanks a lot

  11. #25
    themightymrp's Avatar
    Join Date
    Dec 2009
    Location
    Leeds, West Yorkshire
    Posts
    941
    Thank Post
    177
    Thanked 179 Times in 154 Posts
    Rep Power
    43
    Ah, this is an easy fix

    Looking at your screenshots you have got the profile path and the homedrive path pointing to 2 shares at once!

    You have for the profile path:

    \\web\f$\profile$\username

    You are referencing the f$ share AND the profile$ share which you cant do. I have edited the script to reflect this. It should now create a profile path of:

    \\web\profile$\username.

    In a similar way, the homedrive path you have is:

    \\web\f$\student\first\username$

    Now I have edited your script it will make it:

    \\web\username$

    Once the homedrive path is correct it will automatically map your homedrive for you without any further changes

    Note, if you are running the script with a username you have tested with previously, you must first make sure the account has been deleted and also make sure the profile folder and the home share folder are deleted!! Otherwise it will cause an error if the folders already exist.

    Cheers
    Attached Files Attached Files

  12. #26
    ricki's Avatar
    Join Date
    Jul 2005
    Location
    uk
    Posts
    1,466
    Thank Post
    20
    Thanked 164 Times in 157 Posts
    Rep Power
    51
    Hi

    Have a look at this Active Directory - Single and Bulk User creation and FREE!! as far as I know it creates the user accounts and the folders with ntfs permissions.

    Richard

  13. #27
    ricki's Avatar
    Join Date
    Jul 2005
    Location
    uk
    Posts
    1,466
    Thank Post
    20
    Thanked 164 Times in 157 Posts
    Rep Power
    51
    Hi

    Have a look at this Active Directory - Single and Bulk User creation and FREE!! as far as I know it creates the user accounts and the folders with ntfs permissions.

    I have also use Bulk user creator from here. Its an excel file and easy to use. http://www.wisesoft.co.uk

    Richard

  14. #28

    Join Date
    Jun 2011
    Location
    zooroo44
    Posts
    19
    Thank Post
    8
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    objUser.Put "profilePath", "\\WEB\profile$\" & strUserName 'EDIT -- removed 2 instances of '$' sign


    this make the profile on Drive C: ???


    objUser.Put "homeDrive", "F"
    objUser.SetInfo
    objUser.Put "homeDirectory", "\\web\" &strUserName & "$"

    i understand that the folder will be on the drive directly
    this make the homeDirectory on Drive C: ???


    I make a Drive F on Server Web and i wont to make all the Folders on it how that ?
    Is that how it should look ?
    \\web\f\student\first\Qojo genia ????

    and do i have to make any Share on the drive or Folders or it will work fine on Hide Share ????
    and about the photo in Account ? why isn't the User on the Domain ?

    thanks for your Time
    DC,DNS,DHCP,WDS-2011-06-30-12-43-05.png

  15. #29

    Join Date
    Jun 2011
    Location
    zooroo44
    Posts
    19
    Thank Post
    8
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by ricki View Post
    Hi

    Have a look at this Active Directory - Single and Bulk User creation and FREE!! as far as I know it creates the user accounts and the folders with ntfs permissions.

    I have also use Bulk user creator from here. Its an excel file and easy to use. WiseSoft - Resources for IT Professionals

    Richard
    Thanks Richard Did you try Active User Manager
    i try to Create user with it but i can't get the Share Folder work fine and the map drive can you help me with some Steps ???
    thanks for your time

  16. #30
    themightymrp's Avatar
    Join Date
    Dec 2009
    Location
    Leeds, West Yorkshire
    Posts
    941
    Thank Post
    177
    Thanked 179 Times in 154 Posts
    Rep Power
    43
    It sounds like you are not fully up to speed on how shares work.

    If you have a profile path of \\web\profile$\username this will be looking for a folder with a name the same as the username, within the Profile$ share on the server called Web. The profile$ share is on whatever drive you create it on. This would be F: in your instance.

    The way you have the profiles set out is that there is one hidden share (profile$) which contains a seperate folder for each user. This is the same as what I do. You have also done what I have done and created the users home folders with their own sperate shares i.e. \\web\user1$ , \\web\user2$ etc.

    You could if you wished create just one share called Homedrives$ on the F: drive and just create folders for the users within that. This would then change the homedrive path to look like:

    \\web\homedrives$\user1 , \\web\homedrives$\user2 and so on.

    As for why the accounts are not on the domain, Is the virtual machine you are testing on joined to the domain?? I assume that VM logs onto your network??

SHARE:
+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 4th March 2011, 07:22 AM
  2. Replies: 10
    Last Post: 22nd November 2010, 07:15 AM
  3. Tool to bulk create users / create single user easily?
    By reggiep in forum Windows Server 2008
    Replies: 9
    Last Post: 27th May 2010, 12:30 PM
  4. Replies: 6
    Last Post: 21st May 2009, 10:16 PM
  5. Replies: 1
    Last Post: 2nd July 2008, 04:20 PM

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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