ENTRIES
Welcome to Eric Cheng's online journal! You are not logged in. [ Log in ]
«  :: index ::  »

Automounting AFP and SMB volumes on Mac OS X

:: Wednesday, September 20th, 2006 @ 1:21:43 am

:: Tags:

Of all the things to spend a couple hours figuring out…

All I wanted to do was to have certain shares mount upon login. Who knew that it would be so complicated in Mac OS X?

Here are a few methods I investigated:

1. Create alias of shared volume and drag into Login Items

I harrassed Victor A. for a long time, and he suggested this one. Unfortunately, it doesn’t work.

2. NetInfo entry

I tried following some directions I found online, but I had no luck mounting my AFP share. A dynamically mounted share sounds ideal because I would really much rather have the share mount itself only when accessed… but the point was moot because I couldn’t get anything to work.

3. Shell scripts

I created shell scripts like this:

#!/bin/tcsh -f # mount afp volume mkdir /Volumes/sharename mount -t afp afp://username:password@192.168.x.xx/sharename /Volumes/sharename # mount smb volume mkdir /Volumes/sharename2 mount_smbfs //myserver/sharename2 /Volumes/sharename2 # mount 2nd smb volume mkdir /Volumes/sharename3 mount_smbfs //myserver/sharename3 /Volumes/sharename3

I then used LoginWindow Manager to get the shell script to run upon login and logout, and the following is what happened:

  1. The AFP volume mounted, and the first SMB volume mounted. The second SMB volume did not mount.
  2. I got the dreaded mount_afp: the mount flags are 0000 the altflags are 0020 message upon mounting the AFP volume. Yippee.
  3. All volumes were mounted with root:unknown ownership, which was also the ownership of every file and folder within.
  4. The AFP volume was read-only even to my user account, despite the bizarre root:unknown ownership. SMB volumes were unreadable without sudo.

Lame, and not useful.

4. fstab

I am an fstab moron, and couldn ‘t find any examples of configuring it to mount AFP/SMB. I’m not sure if it’s even possible.

5. Jean-Michel Marino’s AutomountMaker program (it works!!)

This just worked, and I wish I had tried it first instead of trying to be fancy. I created scripts with AutomountMaker and dumped them into my Login Items list in the Accounts system prefs.


So there you go. Anyone have fancier ways of doing this? :)

| Oakland, CA | link | trackback | Sep 20, 2006 01:21:43
  • http://kennyliu.com/ kennyliu

    that’s weird. i have my iTunes library on an AFP server and it just mounts when i access the library. it’s like it’s a local copy.

    not sure why you’re having trouble. computers suck.

  • http://echeng.com echeng

    Kenny – iTunes may be smart enough to know where its library is, but apps like Retrospect aren’t. Or, at least, I haven’t been able to get it to work! So the same problem applies — i still have to mount the volume before Retrospect starts up…

  • http://crowneditorial.com ryan

    I am trying to use AutomountMaker in 10.4.11 and it’s not working. I created a script and dropped the script in the Login Items in System Prefs but the AFPs do not mount when users log in. Has anyone else had this issue with AMP?

ARCHIVES
Journal Home
Where is Eric? (password)
Stuff for Sale
February 2014 (2)
December 2013 (1)
October 2013 (1)
June 2013 (3)
May 2013 (2)
April 2013 (3)
March 2013 (1)
February 2013 (2)
January 2013 (3)
November 2012 (2)
October 2012 (3)
September 2012 (8)
August 2012 (8)
July 2012 (8)
June 2012 (8)
May 2012 (5)
April 2012 (8)
March 2012 (15)
February 2012 (7)
January 2012 (6)
December 2011 (8)
November 2011 (10)
October 2011 (12)
September 2011 (8)
August 2011 (14)
July 2011 (9)
June 2011 (9)
May 2011 (11)
April 2011 (11)
March 2011 (12)
February 2011 (23)
January 2011 (22)
December 2010 (16)
November 2010 (17)
October 2010 (26)
September 2010 (24)
August 2010 (24)
July 2010 (30)
June 2010 (26)
May 2010 (21)
April 2010 (26)
March 2010 (19)
February 2010 (17)
January 2010 (29)
December 2009 (21)
November 2009 (23)
October 2009 (32)
September 2009 (19)
August 2009 (34)
July 2009 (21)
June 2009 (30)
May 2009 (23)
April 2009 (18)
March 2009 (6)
February 2009 (25)
January 2009 (5)
December 2008 (6)
November 2008 (22)
October 2008 (27)
September 2008 (25)
August 2008 (34)
July 2008 (34)
June 2008 (32)
May 2008 (26)
April 2008 (15)
March 2008 (19)
February 2008 (31)
January 2008 (43)
December 2007 (33)
November 2007 (29)
October 2007 (29)
September 2007 (9)
August 2007 (19)
July 2007 (10)
June 2007 (17)
May 2007 (26)
April 2007 (38)
March 2007 (39)
February 2007 (13)
January 2007 (35)
December 2006 (35)
November 2006 (14)
October 2006 (6)
September 2006 (20)
August 2006 (24)
July 2006 (32)
June 2006 (17)
May 2006 (23)
April 2006 (16)
March 2006 (16)
February 2006 (26)
January 2006 (33)
December 2005 (17)
November 2005 (21)
October 2005 (18)
September 2005 (17)
August 2005 (5)
July 2005 (15)
June 2005 (20)
May 2005 (25)
April 2005 (7)
March 2005 (22)
February 2005 (20)
January 2005 (38)
December 2004 (6)
November 2004 (24)
October 2004 (16)
September 2004 (22)
August 2004 (12)
July 2004 (17)
June 2004 (15)
May 2004 (11)
April 2004 (35)
March 2004 (40)
February 2004 (29)
January 2004 (36)
December 2003 (20)
November 2003 (18)
October 2003 (10)
September 2003 (18)
August 2003 (10)
July 2003 (34)
June 2003 (12)
May 2003 (49)
April 2003 (42)
March 2003 (42)
February 2003 (15)
January 2003 (7)
December 2002 (17)
November 2002 (19)
October 2002 (24)
September 2002 (22)
August 2002 (20)
July 2002 (21)
June 2002 (14)
May 2002 (15)
April 2002 (11)
March 2002 (13)
February 2002 (20)
January 2002 (17)
December 2001 (16)
Even Older Journal
Travel Journals

CATEGORIES / TAGS
(25) (2) (1) (3) (1) (1) (1) (6) (2) (3) (11) (8) (3) (1) (1) (4) (2) (4) (2) (1) (6) (1) (1) (1) (6) (2) (1) (1) (1) (3) (1) (5) (1) (1) (23) (1) (1) (1) (1) (1) (14) (1) (10) (1) (1) (2) (1) (1) (1) (27) (6) (3) (2) (4) (4) (1) (1) (41) (11) (12) (4) (38) (1) (3) (2) (4) (1) (1) (1) (1) (2) (1) (1) (1) (1) (1) (10) (25) (8) (3) (2) (3) (2) (1) (5) (1) (1) (2) (1) (1) (14) (1) (5) (1) (1) (5) (43) (1) (1) (1) (3) (24) (1) (1) (1) (1) (5) (1) (4) (1) (1) (10) (1) (3) (1) (1) (1) (1) (6) (5) (1) (1) (1) (3) (1) (3) (1) (1) (1) (69) (4) (3) (7) (3) (1) (16) (6) (1) (29) (1) (7) (1) (4) (4) (4) (1) (1) (1) (1) (1) (1) (1) (10) (4) (4) (2) (1) (89) (14) (1) (2) (79) (2) (2) (1) (1) (1) (1) (1) (1) (3) (2) (3) (1) (1) (24) (3) (5) (4) (1) (2) (1)
MOST POPULAR
Most Popular Posts of All Time


Eric Cheng's RSS Journal Journal RSS
Eric Cheng's RSS Journal Comments RSS

proudly powered by wordpress
script exec time: 0.89s
i hate computers.