Persistent File Mapping Even After Logoff

Discussion in 'macOS' started by Portnoy, Aug 25, 2005.

  1. Portnoy macrumors newbie

    Aug 23, 2005

    I have posted this on other forums to no avail.
    Basically, I want to share files (which I have done successfully) and have them remain mapped even if I logoff the Macintosh.

    Is it possible to permanently map a drive to a windows share from a Mac? :confused:

    Everytime I logoff the Mac, I need to re-map the share. I would like this to be automatically done on logon.
    Do I have to use scripts? If so does someone have an example I have never done that before.

    The Mac is a G4 tiger OS X.
    The windows network is run by server 2003.
  2. dm33186 macrumors member

    Jun 3, 2003
    tell application "Finder"
    		mount volume "smb://user:password@ip/share"
    	end try
    end tell
    enter that into script editor and save it as an application, then add it to startup.

    It will run at each logon but not when coming out of sleep. If anyone can ffix the part for coming out of sleep let me know please.
  3. Makosuke macrumors 603

    Aug 15, 2001
    The Cool Part of CA, USA
    There's an even easier way to mount a network volume at login: Just mount the volume and drag it into the "Startup Items" list in the System Pref under your user. That's all there is to it. You might also toss an alias in your dock in case it unmounts for some reason--one click and you're back on, so long as you've saved your password in the keychain.

    Note, though, that you've got to be a little careful when waking a Mac from sleep; I've noticed that the network port sometimes takes a bit to kick in, particularly if you're on DHCP and your lease expires while the Mac is asleep. This can cause the computer to stall if you try to use the network volume before the network comes back up, which depending on your switch can take anywhere from a couple seconds to almost a minute.

    I REALLY wish there was a good workaround for this, as it's been an ongoing problem in the network I admin, but I haven't found one yet. Be just a bit careful and it'll work smashingly, though.
  4. Portnoy thread starter macrumors newbie

    Aug 23, 2005
    Thank you very much.

    I will try those options immediately and let you know if it works for me.
    I ma not sure what you mean by mounting the Share? I can crag and drop it? Too cool!

    In the meantime I have added a Domain to the Active Directory in Driectory Access. I want to delete it but it says: Insufficient Privellages".
    When I try to add another Domain the "Active Directory Forest" is greyed out?

    How do I increase my privelleges?
  5. Portnoy thread starter macrumors newbie

    Aug 23, 2005
    Hey Thanks for all this help. It is really appreciated.

    I have mounted the volume that I want to share from the Windows Server.
    I am not sure what the '"Startup Items"' lis is?

    I went to system preferences-> Accounts->UserName->Login items.
    There is a little window that says Hide|Item|Kind
    I think this is where you mean but whne I did that, it dissappeeared from the System Prefeneces window and appeared on my desktop. At logoff/login it was gone and had to be remapped??

    I am using Tiger OS X

    Thanks for your help.
  6. Portnoy thread starter macrumors newbie

    Aug 23, 2005
    So I tried to make a couple of other volumes to map to.

    No problem at all. When I dragged them into the Login Items they showed up as folder_name and Kind = Volume

    When I logged off and then on again, they didnt show up on the desktop and when I looked at them in the Login Items they all showed as unknown under Kind??

    Any ideas?
  7. Portnoy thread starter macrumors newbie

    Aug 23, 2005
    1. I have mapped the folders successfully.
    2. I have added the folder to the Login Items successfully.
    3. I have added the folders to the Dock successfully.

    On login they all fail. The login itesm never show, the Docked items have question marks on them.

    I am currently behind a router:
    I have a tunnel to the server

    I can ping all addresses from both sides.
    I cannot ping the name of the server. ping FileServer fails.
    I cannot traceroute to the server?? but I can ping it?? weird?
    I cannot connect to the server via Active Directory (The Active Directory Forest is greyed out??)

    I think if I could become a Mac on the domain then this would all work out.
  8. Portnoy thread starter macrumors newbie

    Aug 23, 2005
    Here is where I am at so far.

    I managed to connect to the active directory.
    I went to System Preferences->Network

    DNS settings are the following:
    DNS Server: (The server on the far side of the router)
    Search Domain:

    Now when I connect to the Directory Access I ignore the first field (Active Directory forest)
    Active Directory Domain:
    Hit bind and it was succesful.
    I then mapped the drive and sent it to the Dock logged off then on and it was there but had forgotten what it was mapped to.


    Any assistance would be appreciated.
  9. Makosuke macrumors 603

    Aug 15, 2001
    The Cool Part of CA, USA
    Hmm... from the sound of it you're doing everything correctly (or, I should say, the way I'm doing it), but I've only ever done this with AFP volumes, and have zero experience with Active Directory--I only know my way around the similar LDAPv3 system that Apple uses, and even there I'm not terribly confident.

    As far as the dock and Startup Items links not working, I'm doing exactly what you are works fine with an AFP share, and I'm pretty sure I've also used aliases to mount Windows SMB shares. Perhaps whatever way you're mounting these shares causes their "location" on the network to be different every time, so when the OS tries to reconnect to the same network address, it fails. Not sure why that'd be, though.

    You might try making an alias of the network volume, then unmounting it and seeing if double-clicking the alias remounts it (don't forget to give the keychain your password if you don't want to type it in every time). If so, try sticking that alias in Startup Items or the Dock, and see if that works better than "aliasing" the volume directly.

    As for your other problems, you might check out this site if you haven't already:

    Final note: I've noticed that when I don't have the server's password in the keychain, when I click on a Dock link the username/password dialogue that pops up appears BEHIND any open windows I have for some reason; this can cause it to look like nothing has happened even though it's actually waiting. Clicking a second time will open a dialogue in front, though the first one will still hang out in the back until dismissed, even if you connect to the server. Just a tip.
  10. Portnoy thread starter macrumors newbie

    Aug 23, 2005
    Thanks Makosuke for keeping an interest.

    I have been at this for 10 hours straight today and I think I finally solved it.
    for me the giveaway was this:

    1. I set up all the DNS setting on my windows XP box and pinged the server
    first by IP address then by name. Success!!

    2. I set up all the DNS (as shown above) on the Mac and pinged the server by Ip address Success! by name Failure!?

    I must conclude that it is NOT receiving the Domain information. In windows language it is called a DNS suffix.

    So I mapped a drive. Utilities->Directory Access

    Now the tricky question:
    What in the world does Macintosh call a DNS Suffix in apple-language??

    Under System Preferences->Networking
    beneath the DNS server:
    There is a field called Search Domains. It was empty.
    I filled in

    Logged off
    Logged on Success they were still mapped!

    It tell you what a journey.
    On Monday I did not know anything about Macintosh. Five days later I have managed to network Windows Active Directory and a MSServer 2003, add Macs to the domain and create persistent mappings.

    I could not have done it without this message board and the help of
    and the madjew (I wonder why he is angry).

    Also the person thatturned me on to the document from Miscrosoft called:
    connecting Macintosh OS X 10.3 and Higher Clients to a Windows Small Business Sever 2003 Network.

    Although this document is detailed for SBS2003 I have worked closely wth both Server 2003 and Small Business Server 2003 and they are very similiar.

    Thanks for all your help

Share This Page