2

I'm trying to create a fileserver/timecapsule combo server out of my new raspberry pi (Raspbian), and it's not going as well as I'd like. netatalk, avahi and samba are the packages that I'm using and they're not playing nice with each other. I would like all shares, AFP and SMB to be accessible from a server icon in the finder navigation bar.

This is what I know
Netatalk has built-in bonjour support, so if you run netatalk, the afp shares show up nicely in Finder (great!).
Samba does not have built-in bonjour support, but with the help of avahi, it's possible to advertise your smb shares through bonjour as well, and they show up in the Finder's navigation bar as well (awesome!).

The problem
When netatalk and samba+avahi are both running, it seems like netatalk hides any other bonjour stuff on the same host. When I click on the server icon in the navigation bar, I only see the afp shares, no smb to be seen. I can still use Cmd+K to get to the smb shares, but I find this less preferable, because I want to make it easy to use for non technical people.

Does anyone know how I can solve this?

migrated from serverfault.com Oct 5 '13 at 12:33

This question came from our site for system and network administrators.

3

The answer from dedmoroz is sadly the reverse of what is desired (wanted: enabling Samba+netatalk in avahi should hide AFP shares, actual enabling Samba+netatalk in avahi hides SMB shares). You can see others reporting the same issue (and getting unhelpful replies) on https://discussions.apple.com/thread/5680272 . These days you want SMB in preference to AFP because since Mavericks Apple prefer SMB(2) to AFP.

An explanation of the problem and a solution is discussed on http://ubuntuforums.org/showthread.php?t=1129438 . For example, one workaround is to announce one of the services with a different name: i.e. make the avahi samba.service file say

<name replace-wildcards="yes">SMB on %h</name>

rather than just

<name replace-wildcards="yes">%h</name>

so it differs from netatalk's default name.

2

:) I have a wish to do it the otherway as you, to hide samba while netatalk running but I cant :P but maybe my research would help you.

Make in /etc/avahi/services a .service file which is called smb.service and put this in:

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">%h</name>
 <service>
   <type>_smb._tcp</type>
   <port>445</port>
 </service>
 <service>
   <type>_device-info._tcp</type>
   <port>0</port>
   <txt-record>model=RackMac</txt-record>
 </service>
</service-group>

now in finder you will see both samba and netatalk at same time

1

Avahi didn't work for me due to what I am running on my server and frankly whilst it is nice to see your network share pop up on the Finder Sidebar, a workaround to not installing avahi is to create a master share directory(Folder) then plop all your shares in it. Name the master directory (yourserver.local) or .com if you have the luxury of pointing a domain name to your server.

Plop all your shares in that master directory and make sure your smb.conf file is also pointing to the shares. eg:

[shareOne]
path = /media/your.master.share.com/shareOne

Then when you command-K smb://yourserver.local/your.master.share/ the drive mounts and there is the folder(directory[shareOne]) sitting right there, just drag it to your sidebar and then any time you need to log in, just click it. It's essentially the same without all the messing around installing software you don't need to take up resources on your server.

Questions? I'd be happy to answer... Im a MAC geek and Ubuntu Command Line Server enthusiast.

I'd also like to point out that at our office (a world wide organization), they don't advertise the SMB shares. We have to physically type in the connection, annoying at best so I find that by dragging the directories I use most to my side bar, makes it more convenient to get the files I need.

That said I set up the same concept on my server lab project at home and it is quick to connect. I don't need to have the servers bonjour'd to access them.

Just one thing to note, if the folder icon on the share has 3 little people in it, you can't drag that to your sidebar, that is why we have to put a secondary directory(folder) inside it so you can drag that to your sidebar.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.