+ Reply to Thread
Results 1 to 9 of 9

Thread: Network drive mapping

  1. #1
    Abigor is offline 10+ Helpful Posts 20+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    24

    Default

    Hey.
    Do someone know a script that maps certain folder to the user, and grant appropriate permission for it.
    For example i have a shared folder on the server. I need to automatically create folders in that shared folder for each user with appropriate permission, and then automatically map appropriate folder to that user. Like for user "Clair" - create a folder named Clair and then map this folder to the user with mapping name "clair" and grant NTFS permission only to Clair.
    How its possible? any ideas?
    thnx

  2. #2
    graycat is offline 30+ Helpful Posts 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    57

    Default

    sounds like you're doing home directories, mate. is that the kind of thing you mean?

    Tim.

  3. #3
    Abigor is offline 10+ Helpful Posts 20+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    24

    Default

    Well, not exactly. I just need to automatically create folders for each users and map it as a network drive. I guess i need a script to do this.

  4. #4
    graycat is offline 30+ Helpful Posts 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    57

    Default

    sounds like a script is what you'll need then, mate. where you'll run into issues is mapping that drive to the user as each one will be different. I suppose you might be able to pass something like [code:1]net use y: \\server\share\%username%[/code] but i've never tried it before.

    what do you need these shares for, mate?

    Tim.

  5. #5
    AdamV is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    669

    Default

    sounds to me like the best way to do it would be to define the home drive properties in AD - tell it what drive letter to use and what path (including %username% if doing multi-select in 2003) and it will do the rest for you including creating the folders and setting permissions.

    BUT
    it can only do this if you are happy to just have folders under a share, not shared directly (so this is OK for you but maybe not for others reading this post later). This is only any use if you only have clients with 2000, 2003 or XP since 98 and NT4 will not map to a folder inside a share.

    To change lots of these at once, either use multi-select if you have a 2003 domain controller, or use a script to run dsmod commands if you don't.

  6. #6
    Abigor is offline 10+ Helpful Posts 20+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    24

    Default

    ye, thnx everyone for answers, i fixed a problem a bit.
    In user's profile path i wrote a path like \\server\shared\%username%
    So i did it for each user. It works fine. After that i create a script like net use y: \\server\shared\%username%\ (thnx Tim), and i put it to logon and applied to each user.
    And it works, network drive is mapping to each user.

    But still a little problem, how i can autocatically write a path in users prifile, like \\server\shared\%username%.
    I write it for each user, and if i have many users then it likes i'm wasting time :lol: , maybe it could be automaticated?



    Yea, and there is a one little problem which i really want to fix as well.

    After network drive mapped, users in might to disconnect it. How i can prohibit users to disconnect network drives?

    thanks...

  7. #7
    graycat is offline 30+ Helpful Posts 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    57

    Default

    so you've enabled roaming profiles and then mapped a drive to their profile? why??

    if you want to mod a bunch of users at once, you can try using dsquery to find the user and then dsmod to actually do the damage.

    to be honest i don't think there's much you can do to stop them disconnecting their drives, mate. but i'm still not clear why you want to map to the profile, when it'll just be cached locally at logon

    Tim.

  8. #8
    Abigor is offline 10+ Helpful Posts 20+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    24

    Default

    I guess the best way to do it would be to define Home folder.
    So i created a shared folder in file server, then in in profile tab of user's properties, I connected each user to \\server\shared\%username%

    So system autocatically created a folder for each user, and set appropriate permissions.

    Now when i log on to a clien machine, in My Computer i see a network drive attached. But the path is - \\server\shared\
    not \\server\shared\%username%

    So system desnt map a folder that created in the share (which is user's name) , it maps the shared folder itself. ops:

    In short i mean that systeam maps this one - \\server\shared\

    But must be - \\server\shared\%username%
    because in Home foler i wrote \\server\shared\%username%

    so am i silly or everything is correct?

  9. #9
    AdamV is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    669

    Default

    what's the OS of the client machines?
    have you told it (in AD properties) which drive letter to map?

    Have you now got a separate path for the profiles and the home directory? (you really don't want them to be the same or users will start screwing up their profiles).

    When you go back in and check the user properties, it should have permanently resolved %username% to their actual username. Has it done this?

+ Reply to 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

Search Engine Friendly URLs by vBSEO