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


Click here to return to the '10.4: One way to automount SMB network shares' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: One way to automount SMB network shares
Authored by: Schwie on Feb 07, '07 08:42:34AM
Not to pour cold water on this, but this information doesn't work very well for people with MacBooks and PowerBooks who frequently switch locations where these shares may or may not be available. For instance, if you're at the office and mount the share, but then leave to go home and you don't unmount these shares, they persist when you arrive at home and hang your Mac. Its a major oversight in OS X and how it handles network volumes.

In addition, its very rare that my MacBook Pro is "shut down" when I arrive at work each day. Usually, its sleeping, and this script does not help.

There is a hint for sleeping and mounting here:

[link:]http://www.macosxhints.com/article.php?story=20061224140933809&query=sleep%2Bshare%2Bsmb

but in our testing, it just doesn't work very well. There's got to be a better solution out there!!!

[ Reply to This | # ]
10.4: One way to automount SMB network shares
Authored by: codingismy11to7 on Feb 07, '07 09:11:15AM

Same with my Macbook Pro.

So...I wrote a Python script that is run every 2 minutes (or maybe every minute, i can't remember). It has a list of shares and mountpoints. If they're mounted, the script exits. If not, then it pings the hosts. If they're up, it then mounts the shares.

Yeah, apple needs to do some work in this area, you shouldn't have to have a CS degree to have automounted shares on portable machines.



[ Reply to This | # ]
10.4: One way to automount SMB network shares
Authored by: algernon on Feb 07, '07 09:14:04AM
Automounting Sharepoints at Startup:

http://www.bombich.com/mactips/automount.html

I have a share at home and two at work mounting dynamically. I just have to remember not to try to access one of the other from the wrong place - it hangs the Finder, but not for very long. Otherwise this works great.

[ Reply to This | # ]
10.4: One way to automount SMB network shares
Authored by: taxi on Feb 09, '07 05:00:53AM

Not for SMB shares, unfortunately.



[ Reply to This | # ]
10.4: One way to automount SMB network shares
Authored by: markflo on Feb 09, '07 07:44:02AM

All you gotta do for a graceful exit on failure (due to the shares not being available) is add a "try" statement to the script, like this:

try
mount volume "smb://user:pass@smbserver.lan/share"
end try

Simple.

(you might need to wrap that in a 'tell application "Finder"' statement, though)



[ Reply to This | # ]