ENTRIES
Welcome to Eric Cheng's online journal! You are not logged in. [ Log in ]
« My sister :: index :: Wetpixel/Divester T-Shirt Design Contest »

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? :)

Popularity: 7% | Oakland, CA | link | trackback | Sep 20, 2006 01:21:43

:: 3 comments (rss)

  1. posted by kennyliu on Wed, September 20, 2006 @ 6:54 am

    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.

  2. posted by echeng on Wed, September 20, 2006 @ 10:27 am

    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…

  3. posted by ryan on Thu, November 20, 2008 @ 12:25 pm

    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?

:: leave a reply

Use: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

RECENT MICROBLOG ACTIVITY
  • Watching Da Ali G Show again, and it's cracking me up! 4 hrs ago
  • I'm told that an installation of my images will be up at 1 Sansome (Citibank Building) by Wednesday night! 1 day ago
  • ohhhh.. shower. so good. pure luxury!! 2 days ago
  • Is it shower day yet? I can't remember... 3 days ago
  • If one more person comes up and asks me what my Amazon Kindle is, I'm going to go nuts. Can't a guy read around here? 1 week ago
  • This constant waking up at 3am, 4am, 7am is starting to make me cranky. 1 week ago
  • Vegan farts from my roommate -- they rise to the top of the room... WHERE I SLEEP. MAKE IT STOP!! 1 week ago
  • More updates...
ARCHIVES
Journal Home
Where is Eric? (password)
Stuff for Sale
December 2008 (5)
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 (34)
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

VIENNA TENG
Support my friend and favorite singer-songwriter, Vienna Teng!

--- Next Show ---

Schedule coming soon.
[ discography ]

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

Rice Bowl Journals

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