Announcement

Collapse
No announcement yet.

Baffled By Drive Mappings

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Baffled By Drive Mappings

    What Im trying to achieve is that when a user logs on a logon script automatically maps their shared drives. I have a W2K3 server with 3 additional drives which I have shared at root level for Everyone and Full Access. I have wrote the following logon script -

    net use h: \\neo\D$
    net use i: \\neo\E$
    net use j: \\neo\G$

    (neo) being my server name

    Assuming that when a user logs in it will kick this off and map H, I and J at root level. However, despite being shared for everyone, it states the Password is incorrect for whatever user I log on as except for Administrator. Presumeably this is a permission problem, yet doesnt the fact I made the share available to everyone mean there shouldnt be a password issue at all as there would be no authentication?

    Also, what I really want to do is map say the MUSIC folder which sits on NEO as the D drive to a drive letter for a user, Im not sure of the syntax for that command though, if anyone knows.

    #2
    I found this bit of VBS code which maps a drive for me upon logon:

    Dim objNet

    Set objNet = CreateObject("Wscript.Network")

    objNet.MapNetworkDrive "H:", "\\NEO\D$\DATA"
    WSCript.Quit


    Yet I still get access denied...

    There must be a way to allow *whatever* username to access a folder which is shared for *everyone*. Or would I need to access it as if I were an administrator?

    (getting there slowly but surely..)

    Comment


      #3
      This all works when I apply my user with administratove group rights. Im sure its easiest to do this via using Map Network Drive and reconnect at login, but I wanted to create a login-script that I can simply apply to all users.

      Im flummoxed by this one, I think Ill wait till all the network admins browse the forum on Monday

      Comment


        #4
        Theres no real difference between what the batch file does and what the vbs file does.

        Perhaps the shares grant full access to everyone, but the file permissions for the root of drives D, E and G do not (or possibly vice versa).

        Or maybe there is a problem with the user account. You could try enabling the guest account and see if that makes a difference (if the permissions are ok but the user is not, the shares should start working).

        Is the client machine also part of the Windows domain? If not, that might cause login problems.

        Did you config this manually, or follow one of the wizards?

        This KB article should give you an idea whats needed for a share to work properly, check through the share and file permissions compared to your server (its for Windows 2000 Server, but doubt there is any real difference):

        Comment


          #5
          erk, just had another thought. the <drive letter>$ shares are special shares that I think can only be accessed by users belonging to the administrator group.

          try creating a different share name and see if that works.

          In fact using the $ shares is generally a bad idea, screw up permissions and you have a nasty security problem.

          Win2K3 version of above KB article:



          info on special shares in Win2K3:

          Comment


            #6
            I thought that by using the $ it marks a folder as hidden and not viewable via network neighbourhood for inquisitive users? Ill remove that and try again.

            Comment


              #7
              Originally posted by marcus
              I thought that by using the $ it marks a folder as hidden and not viewable via network neighbourhood for inquisitive users?
              Thats true, but the default special shares <drive letter>$ are configured for admin only. What you posted suggested you were using those shares.

              See the KB article above on special shares.

              It would make more sense to create completely new shares if you haven't, and rename them with an additional $ later on.

              Comment


                #8
                I managed to get this to work under a normal user account by deleting and recreating the shares, this time though I used the built in wizard to share the drives. I love how windows gets so arsey when you dont use one if its little wizards. I can see no difference to this than what I did. The script I used was -

                Dim objNet

                Set objNet = CreateObject("Wscript.Network")

                objNet.MapNetworkDrive "K:", "\\NEO\Data"
                objNet.MapNetworkDrive "L:", "\\NEO\Music"
                objNet.MapNetworkDrive "M:", "\\NEO\Movies"
                WSCript.Quit

                Comment


                  #9
                  I reckon it must have been file permissions; a wizard would change both share and file permissions.

                  Comment

                  Working...
                  X