Author Topic: automount in OSX  (Read 5084 times)

jrab

  • Calf
  • *
  • Posts: 15
automount in OSX
« on: September 28, 2009, 03:57:40 am »
   

Hmmn - for some reason, my last post ended up solved when it wasn't. So re-posting:

 

Basically, I want to set up the linkstation so I have the shares automounted for all users on my mac (everyone in the family has a login, and they all need access to it).

 

The way it works now, is the linkstation shows up, but nothing is actually mounted until you open it and click on a share. 

 

I've tried adding the shares to each user's account to connect on login, but that's a really goofy thing to do and screws up paths (you end up with /Volumes/share, /Volumes/share-1, etc). And it's a pain to manage. I'm looking for the most basic fstab setup that has worked in every company I've been at where volumes that are mounted at login and stay mounted, and it doesn't matter who the user is.

 

for previous post with attempt at an fstab:

 

http://forums.buffalotech.com/buffalo/board/message?board.id=SolvedStorageThreads&message.id=2935#M2935

 

Since the perms are root:wheel, it doesn't work. Also, automount -vc doesn't really mount them - it just created the dirs. While mount -a did mount (with the root ownership) that was still a command I needed to run after booting.

 

Telling the wife and kids "just open the linkstation and click on the share if it's not there" isn't an acceptable solution, as easy as that sounds...

 

thanks
JRAB


Kameran

  • Big Bull
  • *****
  • Posts: 505
Re: automount in OSX
« Reply #1 on: September 28, 2009, 09:42:09 am »
You have tried both smb:// and afp:// ? In the connect to server option?

jrab

  • Calf
  • *
  • Posts: 15
Re: automount in OSX
« Reply #2 on: September 28, 2009, 12:05:07 pm »
   not smb yet. I did try afp, since that's what appears in df when I am connected normally. But what the heck is the proper syntax for all the fstab options? While I was able to get the automount to not barf, it still didn't automount at boot. I still had to go terminal and type "sudo mount -a"

jrab

  • Calf
  • *
  • Posts: 15
Re: automount in OSX
« Reply #3 on: September 28, 2009, 12:07:05 pm »
   

also -

"connect to server option" - where is that? Is that a buffalo thing or OSX?

 

Again, there is no problem making the connection to the share manually through the gui - I just want it to be there for all users of the system (with the same path) at login.


jrab

  • Calf
  • *
  • Posts: 15
Re: automount in OSX
« Reply #4 on: September 29, 2009, 04:34:57 pm »
   

ok, this is my fstab file and the thing's I've tried. Commented out since I still don't have a solution:

 

# device name   mount point     fs-type      options                 dump-freq pass-num

#buffy:/itunes x url net,automounted,url==cifs://guest:@buffy/itunes 0 0
#buffy:/share  x url net,automounted,url==cifs://guest:@buffy/share  0 0

#buffy:/itunes  /Volumes  afp automounted,url==afp://buffy._afpovertcp._tcp.local/itunes 0 0
#buffy:/share   /Volumes  afp automounted,url==afp://buffy._afpovertcp._tcp.local/share  0 0
#afp://buffy._afpovertcp._tcp.local/itunes      /Volumes/itunes  afp    automounted     0 0
#afp://buffy._afpovertcp._tcp.local/share       /Volumes/share   afp    automounted     0 0

#buffy:/itunes  /Volumes/itunes   url net,automounted,url==cifs://guest:@buffy/itunes     0 0
#buffy:/share   /Volumes/share    url net,automounted,url==cifs://guest:@buffy/share      0 0

# these worked with mount -a
#afp://buffy._afpovertcp._tcp.local/itunes   /Volumes/itunes    afp     rw,auto         0 0
#afp://buffy._afpovertcp._tcp.local/share    /Volumes/share     afp     rw,auto         0 0


# -------------------------------------------------------------------------------------
# Mount AFP shares from the ReadyNAS
# servername:/path mount_point url auto,url==afp://username:password@server/path 0 0
# -------------------------------------------------------------------------------------
#buffy:/itunes /Volumes/itunes url auto,url==afp://guest:@buffy._afpovertcp._tcp.local/itunes 0 0
#buffy:/share /Volumes/share url auto,url==afp://guest:@buffy._afpovertcp._tcp.local/share 0 0

#192.168.0.15:/share /Volumes/share url auto,url==afp://guest:@192.168.0.15/share    0 0
#192.168.0.15:/share    /Volumes/share  url  auto,url==afp://guest:@192.168.0.15/share   0 0
#afp://192.168.0.15/share       /Volumes/share          afp     rw,auto         0 0

 

I would (in terminal) run:

sudo automount -vc

to mount. The only thing that sort of works is  this format:

#afp://buffy._afpovertcp._tcp.local/itunes   /Volumes/itunes    afp     rw,auto         0 0

sort of because automount (command line or reboot) creates the dir in /Volumes/itunes, but it did not actually mount the share.

 

Again, through the gui, no problem. Getting the shares to mount automatically (like servers I use at work) on boot is the goal.

 

I will try smb:// and post back.


PCPiranha

  • Big Bull
  • *****
  • Posts: 2209
Re: automount in OSX
« Reply #5 on: September 29, 2009, 05:24:39 pm »
Yeah, i would try SMB.  I think the previous mod was just talking about going to "go" and then "connect to a server" in OSX.

jrab

  • Calf
  • *
  • Posts: 15
Re: automount in OSX
« Reply #6 on: September 29, 2009, 06:41:56 pm »
   

any suggetions as to syntax?

 

No luck with smb - can't even do it from the gui:

go -> connect to server -> smb://192.168.0.15/share will do a connection failed: "There was an error connecting to the server “192.168.0.15”. Check the server name or IP address, and then try again."

 

oddly enough, I can do that with the usbdisk connected to it. Format?

 

I just tried this suggestion:

http://rajeev.name/blog/2007/11/23/autofs-goodness-in-apples-leopard-105-part-ii/

 

I created a file called /etc/auto_afp and put in it:

share      -fstype=afp afp://guest@192.168.0.15/share
itunes     -fstype=afp afp://guest@192.168.0.15/itunes

I then modified the /etc/auto_master file and put in:

/Network/Servers        auto_afp

When I run "sudo automount -vc " I get the shares in /Network/Servers they have funny perms:

dr-xr-xr-x  2 jrab  staff    1 Sep 30 01:25 itunes/
dr-xr-xr-x  2 jrab  staff    1 Sep 30 01:25 share/

 

but I was able to cd into them and they worked!

 

Only problem is, I unmounted and tried again to validate, and then I got:

ls: itunes: ENOLINK (Reserved)

 

The other problem is - /Network/Servers doesn't show up in the gui, so even though it's (maybe?) working, I can't access it except from the command line! Not so hot...

 

 

 

 


Deputy5211

  • Calf
  • *
  • Posts: 2
Re: automount in OSX
« Reply #7 on: December 29, 2011, 05:18:06 pm »

I, too, would like to know how to have the volumes pre-mounted for every user, WITHOUT the need for users to enter ANY commands.  Want LS Pro volumes to show up in Finder automatically, just like the native OSX does.


x020044

  • Calf
  • *
  • Posts: 1
Re: automount in OSX
« Reply #8 on: January 12, 2012, 05:56:28 pm »

Me three... I have tried various approaches to automounting AFP shared disks connected to my Airport Extreme (4th gen). AppleScript apps work, but not to automount a home directory. I have tried the AutoFS approach described in this discussion's history. Always gives me errors.  On the Airport Extreme side, I have tried all three possible secure sharing configurations (disk password, Airport password, and user passwords).

 

Again, my objective is to auto mount AFP disks connected to an Airport Extreme, for multiple OSX Lion users. 

 

Do I need to buy Lion Server to do this.  I am getting desperate. Already sank a week's worth of experimentation on this, to no end.