The third in a three-part series on how to leverage Linux to get the most from your network, this tutorial shows how to use Samba to integrate your Linux and Windows networks (reg. req.). Sample code and configuration files are provided throughout to aid understanding.
https://www6.software.ibm.com/developerworks/education/l-lpnsamba/
It’s still asking me to login with that link.
It’s still asking me to login with that link.
http://www.getfirefox.com
use firefox and bugmenot extension
http://extensions.roachfiend.com/index.html#bugmenot
Nice site IBM. I can’t even register and you don’t give a reason.
My hunch is you’re not typing in an e-mail address for your userid. It took me a minute to spot the problem when registering.
I use linux+gnome as my workstation at work. Every single day. Most weeks an average of 70+ hours per week (startup). My workstation works and runs pretty much flawlessly except for *one* thing. That thing is samba + smbfs + cifs. Because of my need to interact with smb shares on my network, from both windows and samba servers, I find myself rebooting my workstation *at least* one every couple days!
I don’t think samba developers really worry about client issues much. I know that in the past the client tools were very neglected and now it seems like cifs is a pain in the ass too.
The #1 problem I have is to do with sleeping, uninterruptible processes that are stuck on IO queues. Samba does not properly indicate an IO error (probably because it doesn’t know itself) even though this happens quite frequently. So the process is stuck, cannot be killed even with kill -9. Then, this is beautiful, I can’t unmount the fs either because… it is busy because of the stuck process!
This is only the most common manifestation of this problem. If a smb filesystem just goes away (which commonly happens with people sharing stuff off their desktops) again all my apps are frozen and I can’t unmount anything. This is similar to what happens with stale nfs handles. It is equally stupid and annoying.
Now, don’t think these are the only problems we have with samba. There are endless permissions issues as well. Mysterious inabilities to create files from some clients while others have no problems. Dieing under heavy load, etc. AAAGH! God samba is frustrating! Certain classes of file locks are not implemented so apps that use those locks just think the file is not locked and file corruption occurs (for me MS Office under wine uses these locks).
Configuration of both clients and servers is a F***ing nightmare! Are you kidding me? Absolutely no half way reasonable GUI for clients to do basic mounting or to see server information or to configure servers?
Someone needs a really sweet network filesystem that can be transparently deployed on both windows and unix/linux clients and servers. This network fs needs to actually work! (not SAMBA!!) and needs to actually be secure (not NFS!! NFS4 has hope).
I know this must be a hard problem. And I know that if client side is neglected on samba then that means no one cares. This is OSS right? Scratch an itch if you have it. Well even though I understand these things it doesn’t make it any less of a *pain in the ass*
Get a clue. I’ll give you a free one because I am feeling charitable.
smb4k: It works like a dream. It searches your network, point it to a share, mount it and use it for as long as you need to.
There is nothing wrong with Samba.
“There is nothing wrong with Samba.”
Wow, good going there. You’re right, those freezing processes, umountable shares… as long as it has a GUI, it’s perfect. Heh.
Samba isn’t great, but neither does it suck. Sadly, it’s the best out there.
Get a clue? You’re giving me a free one? What a joke. I am not a system administrator. I install win2k and become part of the kerberos domain and everything just works after that. I install Fedora Core 3 (which comes with samba-3.0.9) and it most certainly does not work. We’ve been having nighmares trying to get the linux clients to work with this setup.
Look, maybe there *is* a way to make it work. Maybe smb4k “works like a dream” but the fact is that many people have similar problems to mine. At best that means that the tool could be made more user friendly. At worst I am 100% right. do you think I made that I/O stuff up? There are bugs in redhat’s bugzilla regarding exactly this issue.
When you say smb4k are you talking about the upcoming samba 4? Well that is great. Maybe your response should have simply been – why don’t you try out samba 4 instead of telling me to “get a clue”.
FACTS:
– samba 3x cifs clients do fail under heavy load
– it does frequently cause processes to enter an unrecoverable sleep
– it does not have any model for servers that appear and dissapear (this causes apps to block for ever, just like nfs)
What a stupid answer you gave me. I didn’t make this stuff up. It is the truth with samba 3x. You should get a clue.
“I install Fedora Core 3 (which comes with samba-3.0.9) and it most certainly does not work. We’ve been having nighmares trying to get the linux clients to work with this setup. ”
there in lies your problem. read the release notes for fedora core 3 and search the user list archives. you would find the information you would need to get this working.
”
What a stupid answer you gave me. I didn’t make this stuff up. It is the truth with samba 3x. You should get a clue.”
not really. samba 3x works just fine. you just need to do what I suggest above
when you rant on something its better to look up specific information related your distribution. in general dont assume that particular versions or software in general is buggy or your experience is universal.
think of this: samba is a major part of any hetregenous network and has a world class implementation that has been working rock solid for a good number of years. its a rare chance that one particular version of this software would suddenly turn buggy
you are delusional. Problems with linux clients has *always* been buggy. I posted questions like 4 years ago regarding smbfs and was told flatly that it was barely maintained.
Just because samba “works fine” for you, in your environment means nothing. There are many different network environments and it does not and has never worked properly for me especially wrt linux clients. That it works fine as a server with only windows clients is not something I will dispute at all.
However it is undisputable that the client implementation if not at all optimal. (oh and I did search the fedora-list mailing list and found jack shit to backup your “suggestion”)
I install Fedora Core 3 (which comes with samba-3.0.9) and it most certainly does not work.
In other words, you’re using an unstable distro with bleeding edge software and you’re wondering why it doesn’t work out of the box?
smbfs is unmaintained, as far as I know. It has been superseeded by cifs so I don’t know what the problem is with that.
I agree with… whoever up there… Samba is very widely used. I don’t think it’s as bad as you’re making it out to be.
Like the nun said… it’s Fedora.
Has anyone figured out how to force cifs/smbfs to mount under particular security context? mount.nfs provides on option of “-o context=” for the purpose, but an eqv option seem to be non exisitent for mount.cifs
Sometime I am lazy and want to share windows hdd contents via http, but selinux/cifs/apache under FC3 does’nt work along well……
Firstly, smb4k is just a browser/mounter for samba with a nice KDE interface (I prefer to have entries in fstab that I can mount under the devices:/ kioslave, or use smb:/ if I need to browse the network or just copy files from a temporary computer/share).
I have to say I have experienced problems, like video will freeze when I’m playing it off a server. I’m not entirely sure it’s samb’s fault, but I can play video WinXP to WinXP fine, or if I copy the video it plays fine.
Most of the time samba works, but if there is a problem it has a habit of bringing down the whole system.
I’ve tried to get cifs working, but it just would not mount, and there’s very little documentation. I was under the impression that cifs was the one that’s unmaintained. mount.cifs isn’t even included in the standard Slackware package, and few people seem to know anything about it.
Samba is always unpredictable, unstable, and mostly a pain to use.
With every upgrade of Samba something is broken or changed (without enough information to help people resolve the problem) and it’s alway a big hasstle to get it working again.
And I haven’t seen many Linux programs that can’t be killed, but I have seen Samba processes that just couldn’t be killed and the only way to get rid off them was to reboot a system.
Something like that can’t be tolerated on Linux.
If I can’t kill a process than the ofending software doesn’t belong to Linux.
Samba should’ve been forked or replaced by something else long time ago but looks like nobody is up to the task other than the boneheads from samba.org
Yeah, I do hate Samba too and I’m sure I’m not alone.
To you and all other whiners:
If you don’t like it either don’t use it or contribute to become better.
Saying “Samba sux” is leading nowhere. And be sure that GNU/Linux would have been still in the dark ages if samba was not around.
To me Samba is one of the best efforts around.
Foo: I took the comments from Eu as either trolling or misguided fanboydom. If it was a troll, judging from your lashing out at Eu and others, he got you!
That said, I’ve never had problems with SMB/CIFS shares, though that’s just me.
Ok, so this only has to do with my experiences on my home network and not in a business environment network, but…
I have used SAMBA on my home network of 6 machines since 1998 with a mixture of Win95-98 and Linux OS’s. In the beginning, all went fairly smoothly, until I started upgrading some of the machines and installing Win 2k on some of them. Problems developed with the 2k machines. Now that I have one machine running XP the problems with that machine and SAMBA are a real nightmare.
Not being an expert, my impression is that somehow M$ is behind this debacle since Linux and therefor SAMBA is an enemy to it’s dominance. Since their sourcecode is secret however, there is no way to prove this of coarse but it would not surprise me in the least that the problems are being artificially created by M$.
These comments are becoming completely out of hand, IMHO. I’ll speak from my own perspective also: I’ve used samba since the 2.2 series (currently using kernel 2.6.8.1 and 3.0.9) in the context for which it is really intended, to power my domain of Windows clients; its performance and reliability has been absolutely exemplary. Of all the network services on offer within my environment it’s possibly the last thing I find myself worrying about.
Let’s not get overly confused between smbd (a user-space implementation providing SMB/CIFS server functionality) and its corresponding implementation in the kernel (used when a Linux client must mount a SMB/CIFS share and, in this context, pertaining to the Linux kernel alone). There is a good deal more complexity in integrating a network filesystem into kernel space and, should it not perform precisely as expected within one’s particular parameters, then that is not necessarily a heinous indictment on the entire Samba product, nor is it a reason to write sour and quasi-inflammatory comments which, frankly, serve no useful purpose here.
There are some things I don’t like about samba (system policies can be effected but it’s poorly documented and not entirely straightforward, ditto for LDAP). But there are many things I can do in Samba that would simply be impossible in Windows Server. Quid pro quo.
The reverse engineering efforts of the Samba team are laudable and I learnt more about NetBIOS/SMB/CIFS from reading some of the superb technical notes provided than I ever had from reading any number of Microsoft Press books. I agree with Pavel that it is a very important thing to have been brought to Unix and Unix-alikes (yes, GNU/Linux is not the only solution out there .
I am sure there are problems with the SMBFS/CIFS client implementation in the kernel. Frankly, there are lots of problems with the Linux kernel. Fortunately for me, I have had good experiences with it. Someone complained about never getting the CIFS client to work. I took a look at the manpage to determine the parameters which had changed and had it up and running first time. Really, I cannot understand what is so difficult about it. Remember, if the required tools are not provided with your distro then that is a matter for the distro vendor not the Samba team. I think genuine bugs should be commented on constructively, where possible, and preferably in the right places.
Slightly OT: I use NFS when I require connectivity between my Linux clients and a Linux server. It seems that using the mount options “hard,intr” has always enabled processes which are accessing an NFS mount to recover seamlessly after interruption, where “intr” allows the process to be interrupted in the case that the NFS server never comes back online. It also seems that NFS on the client works a good deal better if you run “nfsd”, even if you do not need to export anything. Finally, NFS appears to work better over UDP in 2.4, and TCP in 2.6.
I think you’re becoming unduly alarmed! The only issue I ever had with XP was with SMB signing. The fix at the time was to disable it on the XP box – a fix that was well known and widely published. However, Samba has now supported SMB signing for a while. I’ve had no problems with XP/Samba interoperability. Mostly using Win2K here, but I have three XP boxes on my Samba powered domain: two running XP SP1 and another running XP SP2. Two of these three machines are full members of the domain. The fact of the matter is that it’s working.
Judging by his past comments, that’s probably both.
As for Samba, well, I never had a major issue with it (except when I tried to set it up as a PDC) but I have always used a Windows client to access it. I still use NFS for Linux clients.
I agree 100% with you Foo. We have the same problem at work and we’re trying to find another solution. Samba is very troublesome and has big permission issues. We’re actually thinking about moving to FTP for the moment as we’re running OS X, Linux and Windows.
Samba has a problem, and all I get on IRC trying to get help is RTFM. When suddenly something fails to unmount and the system hangs, something is wrong.
On a side note, KDE’s smb:/ works like a dream, but smbmount is horrid.
I speak from experience!
Ok, samba has tons of problems, but why does an IO error makes a process unkillable? This should no happen.
IBM web site, specially “Redbooks” section, is a great source for good documentation. You do not usually need to register in order to get the papers and how-tos.
Many of the articles on the site are related to IBM hardware and software only but some others are good quality configuration and installation manuals for linux in general.
Anyone interested in Linux should have a look at redbook seciton at http://www.redbooks.ibm.com/
David
I don’t know why but I know that I had that problem with the lastest version of OpenLDAP…
I have used smbfs for years (since the Redhat 6.1 days) to backup gigabytes of data per night from our Windows (NT, 2000) servers. I don’t recall ever having any trouble whatsoever.
I would have actually registered to read this one, but they “can’t process my request” at this time. Typical.
We’ve integrated Samba 3 into Active Directory, and it works great. I have Fedora Core 3 running at home, and it also works great with Samba, going from Linux to Windows XP, and vice versa.
But it takes reading that Samba 3 by Example book front to back to get it to work perfectly (in regard to AD integration).
It’s definitely not plug and play yet. But they’re getting warmer.