PDA

View Full Version : [Merged] SMB Auto Mount on Mac OSX



scritch
6th August 2006, 03:10 PM
Hi everyone,

I am a relatively new (12 months) Mac user for my personal computer needs, however I have a mixed environment (Windows Media Center, Xbox 360, Windows Desktop PC's & Laptops and some Buffalo Linkstation network drives), so have alot of Windows File Shares.

I've searched everywhere for information on how to auto connect (auto mount) Windows File Shares (SMB) during bootup of my MBP and Mac Mini, but have had little success. In the end what I came up with was to create an Automator script, save it as an application then run that application at startup.

The script I made in Automator looks like below. Drag 1 & 2 in order over to the right workflow window in automator.

1.
Library: Finder
Action: Get Specified Servers
Name: smb://workgroup;servername/sharename

2.
Library: Finder
Action: Connect to Servers

Once done it should look like this:
http://www.shasam.net/friends/automator_mount.jpg

With the smb "Name" above - you add this by clicking on the +, then choosing "File Servers" from the "Show" drop down box, then browsing your network until you find what you want. You then need to add the "/sharename" to the end of the "Address". You can get this share name from the Windows PC, or via the drop down box that comes up when you connect using the "Network" link in the Finder.

Once done, disconnect the shares you may have manually connected yourself (they'll be on your desktop), then run the script. You should see the red automator dot up near the clock of your Mac, then the shares should turn up one at a time on your desktop.

Once this works, choose "Save As..." from the File menu, and save it as an application somewhere on your Mac (somewhere you'll remember). You can then go into the "System Preferences" then into Accounts, and go to Login Items, click the + and browse to the app you just created and add it.

You'll then have your SMB shares mount automatically every time you load your Mac.

Note: If anyone has a better way to do this that is easier, please let me know.

Thanks,
Shane.

dangelovich
6th August 2006, 03:17 PM
It can also be done by mounting the share manually, then drag-and-drop the share's icon into your Login Items in the System Prefrences...
You need to have the share's username and password details saved in a keychain for this to work.
(I've only tested it with AFP, but I assume it works the same for Samba)

Only downfall is that it opens the share at startup, so you have to close the finder window...

scritch
6th August 2006, 03:18 PM
<div class='quotetop'>QUOTE(dangelovich &#064; Aug 6 2006, 03&#58;17 PM) 201922</div>

It can also be done by mounting the share manually, then drag-and-drop into your Login Items in the System Prefrences...
You need to have the share&#39;s username and password details saved in a keychain for this to work.
[/b]

The weird thing is this is the first thing I tried, but it has been inconsistent (ie sometimes works, sometimes doesn&#39;t) between different Mac&#39;s, users and/or new installs of OSX. Hence the reason I made this script.

Regards,
Shane.

TheOneWhoIsMany
9th January 2007, 07:35 AM
I know this is an old topic but...

Is it possible to mount SMB shares somewhere other than the desktop?

bartron
9th January 2007, 07:49 AM
I know this is an old topic but...

Is it possible to mount SMB shares somewhere other than the desktop?

wow...that's a long time between joining and first post.

anyway...yes it is. Being unix you can mount a volume pretty much anywhere in the filesystem using the 'mount' command on the command line. Type 'man mount' on the comman line to find out more. Not sure if this can be done via gui (i.e. specify the mount location).

Bartron

pipsqeek
9th January 2007, 07:55 AM
Finder will mount any "Media" type of volume on the desktop. What Bartron says is correct, in the UNIX Terminal you can mount any volume anywhere you like.

pipsqeek

Currawong
9th January 2007, 09:36 AM
More correctly, depending on the server, it will be mounted in /Volumes or /Network and shows on the Desktop.

TheOneWhoIsMany
9th January 2007, 04:43 PM
wow...that's a long time between joining and first post.

anyway...yes it is. Being unix you can mount a volume pretty much anywhere in the filesystem using the 'mount' command on the command line. Type 'man mount' on the comman line to find out more. Not sure if this can be done via gui (i.e. specify the mount location).

Bartron

What can I say...long time reader first time poster :)

I also like to use the "Search" option.

Ok excelent. I know what you mean by that. However is it possible to mount smb shares without placing a link on the desktop?

floyd
21st January 2007, 11:06 AM
So I have a Lacie ethernet mini drive with a smb share setup. I use this to store my eyetv recordings etc. Is there a way to have this share automatically mounted everytime I boot my mac or wake from sleep. Kinda sucks having to click on network etc in finder each time.

Edit: never mind. I found this

http://forums.mactalk.com.au/showthread.php?t=21829&highlight=auto+mount+smb

Guess i should have searched before posting :o

feeze
21st January 2007, 11:09 AM
You can drag the share into your sidebar. I am not sure if this will auto mount the share but it at least will save you having to search through the network every time.

mini_Matt
21st January 2007, 11:33 AM
I was looking for something totally different yesterday but stumbled onto this http://www.macosxhints.com/article.php?story=20060731083131745 Is that what your after?