PDA

View Full Version : How to compile Samba for OS X 10.5.6


Vectorm12
02-18-2009, 03:24 AM
Hey guys I'm looking into updating Samba on OS X but I have no experience in compiling sorcecode on OS X which means I would need a step by step guide if someone has the time to help me out.

Unfortunately the samba.org helpfiles don't deal with OS X specifically which means I am completely in the dark on this one. If anyone can help me with the specific commands I need to run in order to compile and install the new 3.3.0 Samba on OS X I would be most greatful.

Thanks in advance

agentx
02-18-2009, 04:33 AM
I personally would use Macports or Fink to install packages rather than replacing the internal workings of OS.

Vectorm12
02-18-2009, 04:43 AM
yeah I have downloaded and installed fink in an attempt to update samba but I have no clue about how to get it to install the updated samba packages.

I can't find it in the list of the commander but if you have any ideas about how to make it work I would be most greatful

agentx
02-18-2009, 04:52 AM
Macports may be the better way for you.

hayne
02-18-2009, 08:39 AM
Before you start, see the "open source" section of this Unix FAQ (http://hayne.net/MacDev/Notes/unixFAQ.html), especially the part about the need for the Apple developer tools.

tlarkin
02-18-2009, 08:41 AM
Do you need to update SMB on your Mac? I mean 10.5 has it preinstalled. What is your higher goal here? I can file share to my windows servers and even my Vista boxes with 10.5 and I have never ran an update for samba.

Vectorm12
02-19-2009, 07:31 AM
Do you need to update SMB on your Mac? I mean 10.5 has it preinstalled. What is your higher goal here? I can file share to my windows servers and even my Vista boxes with 10.5 and I have never ran an update for samba.

Yeah sorry this is a followup to another post I made in the networking section but I'll give you a quick rundown of the issues I am having.

Basicly I've got about a dussin macs running OS X 10.5.6 connected to a AD provided by a series for Windows 2k8 Servers. In the same AD we also have our central storage system a 50isch TB Isilon cluster which support both NFS and SMB(unfortuantely not AFP which I know for a fact actually works well in 10.5.6).

On the isilon system I have several shares containing very large amounts of subfolders most of them above 3k subfolders. The issue here is that the macs running 10.5.6 will not display the complete list of subfolders, but instead list at the most around 1.6k subfolders(the amount of folders displayed even vary somewhat between machines and searches). There are however no issues as long as the shares contain less than about 1k subfolders/items.

Let me point out that there isn't an issue with hidden/nonhidden files/folders since the Linux machines (Ubuntu 8.10 smbd version 3.2.3) I use can access and display the entire list of subfolders without an issue.

I have been browsing around different forums and I did indeed run into one post where the author said to have run into the same issue as me and that he resolved it by updating the samba version shipped with 10.5.6(3.0.25b-apple) to the later 3.2.6 provided by www.samba.org. He did however not specify how he did this which has left me here searching for answers about how he actually may have done it.

The reason I haven't used NFS mounts instead is a whole story in it's own right but the end result was that I ran into all sorts of issues with certain file/folder combinations couldn't be written onto the storage system.

tlarkin
02-19-2009, 08:21 AM
Wow, very interesting issue. I have to ask one more question, have you contact Apple support? Do you have Apple Enterprise support?

Also, Windows servers can run AFP, you just have to enable it. Have you even tried that?

As for installing the newest version of Samba, not sure if that is going to help at all. As mentioned earlier, Fink commander is a package manager that can install such things on your client. I guess you could also look at the samba config file on the client too and see if any tweaking can be done there.

Sorry I can't be of much help as I have never run into this problem before and I would just be systematically doing a process of elimination like you are to troubleshoot it.

Good luck though.

Vectorm12
02-19-2009, 08:40 AM
Wow, very interesting issue. I have to ask one more question, have you contact Apple support? Do you have Apple Enterprise support?

Also, Windows servers can run AFP, you just have to enable it. Have you even tried that?

As for installing the newest version of Samba, not sure if that is going to help at all. As mentioned earlier, Fink commander is a package manager that can install such things on your client. I guess you could also look at the samba config file on the client too and see if any tweaking can be done there.

Sorry I can't be of much help as I have never run into this problem before and I would just be systematically doing a process of elimination like you are to troubleshoot it.

Good luck though.

No as things are at the moment I have no yet contacted Apple about this issue other than making a post on their support forums which hasn't been answered at this time. As for enterprise support I regret to say that I have no such contract.

As for the Windows servers, yes they can indeed host AFP but since our isilon systems are independant and only use the AD to authenticate users I cannot enable AFP for these specific shares(since the isilon cluster only supports NFS and SMB).

The reason I believe updating the samba packages is simply due to the fact that I've tried accessing the shares on a mac with 10.4.x where it actually worked(10.4.x apparently uses an even earlier version of Samba which ironically seems to work alot better). As a sidenote I've also used Ubuntu 8.10 as I previously said to verify connectivity (ubuntu 8.10 comes with samba 3.2.3)

I've been trying to figure out the fink commander but I've come to a dead stop there as I can't seem to find the samba package to install it on the system.

gsahli
02-19-2009, 09:12 AM
I just looked at MacPorts (GUI = Porticus). It has Samba 3.2.7.
(MacPorts and Fink/Fink Comander GUI are both "porting" repositories)

brettgrant99
02-19-2009, 09:36 AM
I don't have any suggestions about samba/nfs. I have had problems with having too many files in a directory. In unix, a directory is simply another file that contains the names of files that should be contained in the directory.

It has been a while since I have looked into it, but I seem to recall that the max size of the directory "file" is compiled into the kernel. We had this issue on some RH linux boxes and the IT guys were able to recompile the kernels to increase the size of these "files".

Out of the box, these linux boxes had, I think, the file size set at 16bits, so when the number of characters of the filenames contained in the directory exceeded the size that the directory "file" was allowed to be, we had issues.

As the amount of files that the directory could contain was dependent upon the file name, I wonder if this is why you see a variable number of files in the mounted directories.

My theory is that the Isilon Server allows directory "files" to be larger than the Macs and that the Macs happily read these directory "files" not knowing that they are a different size than those on the native Mac system.

I don't know if you can recompile a kernel for the Macs. I remember seeing a section on Kernel Programming in the developer documentation, but maybe that is something that you have to do with Darwin.

To test my theory, I would go to some machine where a problem directory/s can be seen and tar them up into just a file. I would get that tar ball on the mac and expand it, to see if you can still see all of the files.

HTH,
Brett

Vectorm12
02-20-2009, 03:59 AM
I don't have any suggestions about samba/nfs. I have had problems with having too many files in a directory. In unix, a directory is simply another file that contains the names of files that should be contained in the directory.

It has been a while since I have looked into it, but I seem to recall that the max size of the directory "file" is compiled into the kernel. We had this issue on some RH linux boxes and the IT guys were able to recompile the kernels to increase the size of these "files".

Out of the box, these linux boxes had, I think, the file size set at 16bits, so when the number of characters of the filenames contained in the directory exceeded the size that the directory "file" was allowed to be, we had issues.

As the amount of files that the directory could contain was dependent upon the file name, I wonder if this is why you see a variable number of files in the mounted directories.

My theory is that the Isilon Server allows directory "files" to be larger than the Macs and that the Macs happily read these directory "files" not knowing that they are a different size than those on the native Mac system.

I don't know if you can recompile a kernel for the Macs. I remember seeing a section on Kernel Programming in the developer documentation, but maybe that is something that you have to do with Darwin.

To test my theory, I would go to some machine where a problem directory/s can be seen and tar them up into just a file. I would get that tar ball on the mac and expand it, to see if you can still see all of the files.

HTH,
Brett

Small update on my progress with this issues, I've sucessfully updated Samba to version 3.2.7 using Macports and the Porticus GUI. However the problem persists.

Which means there is more to this than I had hoped there would be. Just to try something I decided to create a test-directory containing 5120 copies of a folder and each of those containing 5120 folders.

However for some reason this folder isn't an issue for the macs to display correctly. The things I'm starting to look into is special characters. Since I live and work in sweden we have several directories and files with "å" "ä" "ö" in them which might generate these issues. Perhaps it's the combination of special characters in directoy/filenames+ the sheer number of items that

Going to generate more folders with these special characters in them to see if I can manage to replicate the errors I am having in the production directories.

dmacks
02-21-2009, 12:41 PM
Also look at the total path-length. There's a limit to how long /the/absolute/path/to/a/file/can/be.txt in the OS X unix kernel.

hayne
02-21-2009, 01:20 PM
Also look at the total path-length. There's a limit to how long /the/absolute/path/to/a/file/can/be.txt in the OS X unix kernel.
If you suspect that the path length might be an issue here, you might find the Perl script that I supply in post #17 of this older thread useful:
http://forums.macosxhints.com/showthread.php?p=514569

Vectorm12
02-23-2009, 09:44 AM
another update on the issues:

I've concluded that it is not an issue with the total path lengh after creating a second set of folders on the same share with a total path lengh of about twice the size and number to sub items as the affected directories.

so it is not about total path lengh, subfolder item count. There are two more alternatives I can think of, sheer size of the items contained within the subfolder(although I have no way of confirming this as an issue (since the total capacity of the files are about 40TB). or perhaps that the issue is linked to a script generating the symbolic links(although I have a hard time believing it would be related to that as I can handle and list all directories via NFS on Mac or NFS/SMB on Linux).

What I will be doing next is running a seperate instance of the server(on linux instead of Windows this time) that is generating the hostfiles and see if I run into the same issues there.

Vectorm12
04-07-2009, 07:59 AM
Well after a long time of troubleshooting and testing out different theories I've managed to single out the culprit in this situation. Turns out I was running a older version of OneFS(proprietery filesystem used on the Isilon cluster) which was causing the issue with directories/items not displaying in finder on mac via SMB. A update to the latest version solved the issue right away and now all mac clients display a complete list of directories/items.

daehl
03-14-2010, 10:50 PM
I'm attempting to upgrade Samba on my PowerPC Mac and looking for a little assistance.

I have been able to successfully compile and install the Samba 3.5.1 binaries in the directory:
/usr/local/samba/

But I'm a little unsure of what to do next.

I was following the instructions posted at:
http://www.samba.org/samba/docs/using_samba/ch02.html

But they are a bit out of date (covers Mac OS X 10.2 installs)

I don't want to stomp on the existing version of Samba, but I'm not sure how to startup 3.5.1 instead of the pre-installed version (3.0.25b-apple). The instructions refer to editing a Samba startup file that apparently is no longer used in Leopard.

I searched in the System directory for similar files and found a plist file:
/System/Library/LaunchDaemons/org.Samba.winbindd.plist

My guess is I need to edit that plist, but I'm not sure exactly how to edit a LaunchDaemon plist (I know how to use Property List Editor of course).

Anyway, if anyone could help I'd appreciated it. All the online instructions I find for installing/upgrading Samba for Mac OS X only covers very old versions, and it appears the daemon startup process has changed in recent versions of Mac OS X).

In case anyone's curious, the reason I'm doing this is to get my bluray player (a Samsung BD-P3600) to work properly with my Mac for file sharing purposes. Their firmware has a bug that prevents it from properly communicating with Samba on Mac OS X & Linux OS. Version 3.5 fixed it. And who knows how long until Apple upgrades Mac OS X to Samba 3.5+.

So any help would be appreciated. Thanks!

Once I get this working on my old PowerPC Mac (which is my current sandbox), I intend on also installing it on my Intel Macs running Snow Leopard.