Map windows file share in OSX 10.5.4

Discussion in 'Mac OS X Server, Xserve, and Networking' started by rolfharris, Sep 17, 2008.

  1. rolfharris macrumors newbie

    Sep 17, 2008
    Hi guys

    Can somebody help me out here. I am totally new to to Macworld so be nice.

    I have successfully binded the machines to Active directory and students are able to login to the active directory domain.

    The problem that i am having is, i want to be able to map 2 drives (as they would see when they login to a windows machine)

    Under windows the syntax is net use H: \\servername\%username%$

    What i want to know is, what is the osx equivalent and where to put it. Also what extension should the script be saved as.

    Any help is much appreciated.

    Doing a certification course at the end of the month so hopefully this will be last noob request

  2. walnuts macrumors 6502a

    Nov 8, 2007
    Brooklyn, NY
    Did you try this?

    In finder, select Go -> Connect to Server (command-K)

    Then type in "smb://[address of networked drive]/server name"

    You will be prompted for login and password.
  3. rolfharris thread starter macrumors newbie

    Sep 17, 2008
    Hi Walnuts,

    I have done that alright, only problem is that they will be students logging in so i need it to be done automatically.

    Any ideas, i was thinking of a script that runs each time a student logs in, similar to the way it is on the windows machine.
  4. walnuts macrumors 6502a

    Nov 8, 2007
    Brooklyn, NY
    Well, I have really almost no knowledge of applescript, but I did tool around with something like this:

    set mountedvolumes to list disks

    if mountedvolumes contains "<Servername>" then
    mount volume "smb://<Servername>"

    end if

    First it checks if the drive is already mounted (this is for my laptop that I bring back and forth, so it isn't a startup script, and sometimes I mount individual drives first, and then run my script to mount all of the drives). I'm not even sure if the checking bit works.

    However, I know the second bit does- the "mount volume" command does the trick.

    Good luck!
  5. plinden macrumors 68040


    Apr 8, 2004
    You can add the smb://... as a Login Item, but you have to connect manually the first time.

    So, using the Go -> Connect to Server option in Finder, get the share mounted on your Desktop. Then open Accounts, select the logged in account, Login Items, and drag the mounted share from the Desktop.

    As long as the share is accessible, it will be automounted on login.

    It would have to be added for all accounts, but you may be able to work with the Login Items Preferences file, which lives in ~/Library/Preferences/ ... I haven't tried that though so I'm not sure if you can just copy the plist file across.

Share This Page