[Macpartners] Persistent SMB connection?

Justin Anderson jander at MIT.EDU
Thu May 3 11:27:54 EDT 2007


Your best option is an applescript or Automator workflow in your  
Login Items.

The simplest applescript is:

mount volume "smb://server/shared-folder"

1. Paste that into a blank script in the program /Applications/ 
AppleScript/Script Editor.
2. Alter the URL to match what you usually type into the Connect To  
Server dialog.
3. Click the button titled Run to test that it works.
4. Save the script, making sure that its format is "application" and  
not "script".
5. Place that script somewhere out of the way, then place a link to  
it in your Login Items under the Accounts preference pane.

Then whenever you login, the script will run and you'll be prompted  
for the name and password to use.

This can be done as an Automator workflow with "Get Specified URLs"  
followed by Connect to Servers. Edit the URLs in "Get Specified URLs"  
to be your "smb://server/shared-folder", save it as an application,  
and place a link to it in your Login Items.

The benefit to using Automator is that it's easy to have it connect  
to several servers, as you just need to add more URLs to the "Get  
Specified URLs" action.

I hope that helps.

Justin Anderson
Macintosh Developer - ISDA
Information Services and Technology
Massachusetts Institute of Technology
jander at mit.edu


On May 3, 2007, at 9:04 AM, Scott Ehrlich wrote:

> To followup my own post, the closest I've come up with thus far is to
> mount the share actually as smb://server (then select the share of
> choice).
>
> A quick fix I found was to create an alias of the volume.  Then,  
> when the
> user wants to reconnect, simply double-click the alias, get  
> prompted for
> credentials, and the server is mounted.
>
> Any other ideas?
>
> Thanks.
>
> Scott
>
> On Thu, 3 May 2007, Scott Ehrlich wrote:
>
>> I can select Command+K (aka Go > Connect To Server) then have the  
>> path be
>> smb://server/shared-folder
>>
>> Now, if I log out (or restart) the mount disappears.
>>
>> How do I get the smb connections to remain permanent?
>>
>> Thanks.
>>
>> Scott




More information about the Macpartners mailing list