Auto mount network shares BEFORE user login?

Discussion in 'macOS' started by Programie, May 29, 2011.

  1. Programie macrumors newbie

    Joined:
    Jul 4, 2010
    #1
    Hi,

    I have a Mac mini (Early 2010) and a NAS (QNAP TS-459 Pro+).
    Now I want to mount some shares from the NAS on my Mac before a user logs in. I tried to add an AppleScript which mounts the network shares after I login but then the shares where mounted too late (I want to use one of the shares as part of my home directory for Pictures, Videos, Documents, Downloads...)

    I also tried to mount it using th /etc/fstab file but then I don't have the permissions to use the share. :(
     
  2. Matthew Yohe macrumors 68020

    Joined:
    Oct 12, 2006
    #2
    Why are you concerned with it happening "BEFORE" login? Why not just drag it to your Login Items?
     
  3. Programie thread starter macrumors newbie

    Joined:
    Jul 4, 2010
    #3
    That's the current state...

    It mounts the shares after I login. But that's to late.
    For example I have all my wallpapers on my NAS. The Mac tries to locate the wallpapers but at that time the shares are not mounted yet. It sets a blank blue desktop background as replacement for the picture. So I have to manually set the wallpaper after I login.

    I noticed that if I use a single picture as wallpaper, the wallpaper gets loaded after login (Cached localy?).

    Is there any way to mount the shares and allow the user to use it?
     
  4. Matthew Yohe macrumors 68020

    Joined:
    Oct 12, 2006
    #4
    If you're just trying to solve this wallpaper issue, it's best just to keep those locally. Otherwise you're going to make more work for yourself than it's worth.

    I believe to do what you're wanting to do you would need to get into LoginHooks. This may allow you to run a script to mount what you need, or redirect your home folders on login.

    Keep in mind though, since you're doing it this way, and not via say Apple's Open Directory, or an Active Directory, you likely could prevent yourself from logging in if there is a network issue. If you use something like a directory service, you can have the mac create a "mobile" account that will always let you log in, and even allow you to sync some folders via HomeSync.
     
  5. Programie thread starter macrumors newbie

    Joined:
    Jul 4, 2010
    #6

Share This Page