Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Automatically mount servers at login Network
Question: how can I automatically mount a server at login? I've got two machines both running OS X, and I want one to always access the other as a server when I log in, but can't for the life of me figure out how to do that.
    •    
  • Currently 3.00 / 5
  You rated: 5 / 5 (3 votes cast)
 
[4,081 views]  

Automatically mount servers at login | 8 comments | Create New Account
Click here to return to the 'Automatically mount servers at login' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Auto mounting Servers
Authored by: macguru on Sep 07, '01 03:51:32PM

The easiest way to do this, is to write an applescript applet.

Use the mount server command.

Then add this applet to your login prefs.

Allan



[ Reply to This | # ]
Even easier
Authored by: Jay on Sep 08, '01 07:14:26PM

Just make an alias of the server you want, and drag it into the login items window in the login control panel. Make sure you save the alias; if you toss it, it won't work. Also, you can't click Add in the login panel and choose it. That treats the alias as a real object, and won't let you choose it. Drag and drop it!



[ Reply to This | # ]
Not quite! Anyone?
Authored by: xil on Nov 17, '01 07:25:45PM

I've tried both the above methods, and neither works quite right.

* Putting an alias in the login items doesn't seem to do anything. I mounted my AppleShare volume from the finder, made an alias to it (and left it on the desktop), dragged the alias into the Login Items list, logged out, and logged back in. My volume didn't mount. Does this really work for anyone?

* I made a little AppleScript with just one line:
mount volume "afp://myLoginName@myServer/myVolumeName"
and put it in the Login Items list. When I log back in, this causes the usual AppleShare login dialog box to pop up, with my login name and password filled in (it's getting the password from the keychain). However, I still have to press the "Connect" button to get it to mount, and this is annoying to do every single time I log in. Is there any way to just get it to mount without user intervention?

(I know I could put my password in the afp:// URL, but that is obviously poor security.)

Thanks to advance to anyone who knows how to do this!



[ Reply to This | # ]
Not quite! Anyone?
Authored by: freeandunmuzzled on Nov 21, '01 03:32:56AM

not wanting to have an alias to a server and the server on my desktop, i decided to skip that step and just dragged my mounted server's icon into the login items window. I fully expected the OS to report that it couldn't find 'reykjavik' (the server's name) when i logged back in, but to my surprise it automounted flawlessly!



[ Reply to This | # ]
Not quite! Anyone?
Authored by: xil on Nov 22, '01 11:44:35AM

I just tried that, and it didn't work for me. Nothing happens, no messages in the console.
*shrug*

What does your item look like in the Login Items list? When I first drag the volume in there, it shows up with its icon (and a kind of "Document"). After I log out and back in, its icon changes to a plain piece of paper icon. I have no idea if that has anything to do with anything.



[ Reply to This | # ]
Not quite! Anyone?
Authored by: freeandunmuzzled on Nov 24, '01 06:17:51PM

after posting that message i realised that something else is causing my server to automount! i tried dragging another volume (actually a partition on the same server) into the login window and on logging in the volume failed to mount and i saw the same thing you describe in the login window. i have since removed both volumes from the login window. for some reason the first volume is always mounted when i login. it's a mystery!



[ Reply to This | # ]
Not quite! Anyone?
Authored by: oem on Jan 15, '02 01:43:12PM

I think it's because when you FIRST connect the 'desired' volume,
you have to'remember the password in the connect dialog box'
doing so will add it to your keychain.
this is what I did and (I made a folder called aliases in wich are all my differents networks volumes) Each time I double-click on an alias, the volume automaticly mount on the desktop without any dialog window. :)

So doing the same and putting then an alias
in your /home/library/StartupItems/ could be the solution.
considering you've added it in your Keychain…before
At least I tried it before writing here, and it worked as I logged in.
All my machines do have static IPs.

What I wish would be to know How the hell, I can put those aliases volumes in the 'Network'. I only see here my computer.



[ Reply to This | # ]
NetInfo!
Authored by: jdub on Jan 15, '02 09:56:18PM

The "proper" way to do this is with NetInfo. The reason you have a Network selection at the computer lever of you machine is for information published by the NetInfo parent directory that you machine subscribes to. The only problem is that I am not too sure how it works with two client installs. As far as I know, one of the machines needs to be OSX Server...



[ Reply to This | # ]