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

10.5: Automount Samba shares in leopard Network
NetInfo Manager disappeared in OS X 10.5, along with all my automount SMB shares from my Buffalo Linkstation. After poking around the net for documentation on the unix automounter, I came up with this solution to get my automounts going again:

According to /etc/auto_master, the /etc/fstab file is now used to dynamically mount shares under /Network/Servers. So you basically just need to transfer the stuff you used to have under Mounts in NetInfo Manager to your /etc/fstab file; mine looks like this:

excalibur:/music x url net,automounted,url==cifs://guest:@excalibur/music 0 0
excalibur:/photos x url net,automounted,url==cifs://guest:@excalibur/photos 0 0
excalibur:/videos x url net,automounted,url==cifs://guest:@excalibur/videos 0 0

Translating, the above shows that I have three Samba shares called music, photos, and videos. They are all on a server called excalibur, and i'm accessing them using the username guest with no password. The second item in the command is x for each line. That's generally the mount point, but because of the way the automounter is configured, that entry is ignored. The mounts will always be placed in /Network/Servers.

[robg adds: I haven't tested this one.]
    •    
  • Currently 2.83 / 5
  You rated: 1 / 5 (6 votes cast)
 
[104,418 views]  

10.5: Automount Samba shares in leopard | 18 comments | Create New Account
Click here to return to the '10.5: Automount Samba shares in leopard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Automount Samba shares in leopard
Authored by: riquito on Nov 08, '07 08:03:45AM

it seems easier to drag and drop your SMB volume in the startup section of the user Account preferences !!!!



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: mendepie on Nov 08, '07 08:41:34AM

The advantage of doing it this way is that the mount is made at boot time, not at login time.



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: brentw on Nov 08, '07 09:53:36AM

it's also uniform across all users, whereas the startup items are a per-user setting



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: genecutl on Nov 08, '07 09:31:09AM

The functionality from NetInfo Manager is now in Directory Utility. Open up that app, click "Show Advanced Settings", and you will see a Mounts tab.

For NFS mounts, I added "-P -b" options under "Advanced Mount Parameters".



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: brentw on Nov 08, '07 09:51:47AM

i couldn't get directory utility to mount smb mounts, only nfs. it wouldn't allow me to click OK unless the url began with nfs://. neither smb:// nor cifs:// worked.



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: kainewynd2 on Nov 08, '07 09:54:11AM

The difference is that this makes the drives mount at startup instead of at login.



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: hypert on Nov 08, '07 10:15:54AM

Nice hint - thanks!



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: dpanacea on Nov 20, '07 02:05:01AM

My issue with dragging a share to the startup items is that it Finder is opened at startup for each and every share you add. Is there a way to stop Finder from opening??



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: Cockroach on Jan 01, '08 02:48:39PM

When I do this, it works at first, but when I log out or restart I get an insufficient privileges error when I try to access a share. If I sudo su I can cd into the share from within terminal. What's the problem?



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: forrie on Jan 16, '08 12:17:28PM

We have a secretary that wants to move to the Mac platform. She's not a tech wiz, but savvy none-the-less.

It seems reasonable that these operations to include an SMB mount at boot time should be inclusive in the GUI somewhere. Out in the world of heterogeneous environments where Windows is not always avoidable.

Or perhaps I've missed something with Leopard, being relatively new to Mac OS myself.



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: innate on Jan 23, '08 08:45:02AM

It sounds like you're on a company network.

In that case you probably don't want to mount the shares at boot time, but rather when she logs in. That's easy to set up: first, mount the shares that she will be using. Then go to the Accounts pane in System Preferences. Open the Login Items tab and drag any mounted shares into Login Items. They'll be automounted when she logs in.

The main tip was about mounting shares at boot time. That works great on a small network, but you have to use "guest" mode (no passwords) or encode the password into your mount command -- because you're mounting the drive before you get to type your user name and password. On a corporate network that would be unusual and/or forbidden. You mount the shares when you login, and it can use your established user and password credentials.



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: calle on Mar 01, '08 02:24:01AM

The most important point in this hint is that it allows you can keep the mount points stable. I want to use the same laptop for two different users and had problems because the SMB share used by both users was mounted at names Shared, Shared-1 and so on, depending on whether the other user has previously accessed files on the share. This gave problems when e.g. the iTunes Library was stored there or you wanted to create links to files on the share.

With this hint, both users can use different mountpoints that will be stable like Shared-UserA and Shared-UserB.



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: GuyGizmo on Oct 22, '08 11:28:22AM

I just tried this in Mac OS X 10.5.5 and it didn't work. At first it was giving me inconsistent errors along the lines of "/usr/sbin/x No such file", and when I tried replacing the x with the actual mount point I wanted it claimed the mount point didn't exist, even when it did. It's also given me errors pointing to "/usr/sbin/mount_url" which doesn't exist, and I don't know why.

Strangely, I just tried it again so I could copy/paste the exact error message I get into this reply but now it just silently fails. I didn't do anything different from my last attempt. In fact, my last attempt was five minutes ago in the same session. (I didn't restart my computer.)

I would love this to work, and have been looking for a method to automount samba shares at boot time since Mac OS X 10.3, but I've never, ever gotten it to work, and it surprises me that people here don't seem to be having any trouble with it. What on earth am I doing wrong?



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: astateofwork on Nov 10, '08 09:32:13PM

I was also having this problem on 10.5.5. I located mount_url by doing a find for it however (its at /usr/libexec/mount_url ) and created a symbolic link to it. That didn't fix the problem however, and Google isn't being any help. Is it just not possible to automount samba/cifs shares in 10.5.5?



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: gordonlbuchanan on Jan 31, '09 09:12:58PM

This works for me, but I have a problem with permissions when used with multiple users via fast user switching. The first user of the share has no problem. Any subsequent user can not access it. I looked at the permissions with terminal.

The share is called nas:/buchanan. Before accessing it it looks like this.

$ ls -l /Network/Servers/nas
drwx------@ 1 root wheel 16384 Jan 31 23:03 buchanan

Once I read the share, then permissions change to:

$ ls -l /Network/Servers/nas
drwx------@ 1 gordon wheel 16384 Jan 31 23:03 buchanan

At this point gordon (that's me) is the only one that can use it. Any ideas on how to fix this? I'm using Leopard 10.5.6.



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: gordonlbuchanan on May 20, '09 10:34:52PM

I've solved my problem with multiple users by creating a file /etc/fstab with the following:

nas:/buchanan /Users/gordon/Shares/buchanan url automounted,url==cifs://shareuserid:password@nas/buchanan 0 0
nas:/buchanan /Users/aaron/Shares/buchanan url automounted,url==cifs://shareuserid:password@nas/buchanan 0 0
...

Make one line per userid on the Mac that wants access to the share. That way each user has their own mount point in their home/Shares directory. You can also drag a shortcut to this mount point onto your desktop for easy access. On my system, sometimes the first one or two times I try and access it I get a not found error. But if I try again then it works. I think this is because my NAS drive has gone to sleep and takes a while to spin up on access.



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: xylo on Mar 11, '10 09:58:24AM

Hi, I'm the author of <a href="http://jm.marino.free.fr/index.php?switch=sw_&title=AutomountMaker&nav=introduction">AutomountMaker</a>, and you might want to try it in this case; it may help you to automount your favorite SMB volume at startup and more...



[ Reply to This | # ]
10.5: Automount Samba shares in leopard
Authored by: gerardw on Apr 20, '10 04:12:01PM

Thanks! Wish I had found this <i>before</i> the two hours of googling.



[ Reply to This | # ]