Why do Linux networks use Samba?

Solution 1:

Is Microsoft's network filesystem so good?

From the perspective that it is everywhere, then yes it is good. If you are asking if it is a good protocol, then the answer is that it isn't really all that great. It has large problems on links with high latency. It has far too many redundant commands. Microsoft has fixed a lot of this with SMB2.

Linux systems defaulting to this Microsoft technology?

There are lots of users who require that their Linux boxes be able to participate in a heterogeneous network. SMB is the lowest common denominator that seems to be supported on all common operating systems.

What would be a Linux-native way to share files and printers

NFS is probably the most standard *nix file sharing protocol.

LPR or CUPS is the most common Printing protocol.

Personally I strongly wish that webdav would become more common for file sharing. But I have yet to find a really good webdav daemon for *nix.

Solution 2:

The big 2 file sharing systems for Linux are NFS and SAMBA. We run both here for different reasons. Here is an off-the-top-of-my-head pro/con list

NFS

  • + Server-To-Server
  • + Fast
  • + Easy to set up for a small number of users
  • + Very dependable for clustering/High Availability
  • - Each client machine needs its own config in /etc/exports
  • - Very limited security options.
  • - Users must match on both server and client to preserve unix permissions
  • - Symlinks to content outside of the share will fail, or worse use a same-named resources on the client

SAMBA

  • + Server-To-User
  • + Very flexible configuration
  • + Ability to use per-user authentication against Active Directory, LDAP, local users, samba users
  • + Compatibility with most other OSs
  • + Ability to share printers
  • + Ability to save files with arbitrary permissions.
  • + Optionally supports full UNIX permissions
  • + Ability to make symlinks to resources outside of the share appear to be inside the share. For example to re-export a mounted share.
  • - Slightly higher overhead than NFS
  • - Flexible config is easy to screw up
  • - Caching/locking issues. If not all users are using samba to access the files, some users might not see changes to files
  • - Microsoft Issues. MS likes to "improve" the spec every few years, so future windows desktop client may not be able to connect to your Samba server. The Samba team is good about keeping up with MS, but you have to be aware of this

Solution 3:

Samba reached its prominence in large part because it allows unmodified Windows stations to talk to it, and since Windows is typically the largest population of Desktop users on any given network that makes it more interesting. The other population, Mac users, can use the not-well-maintained Netatalk package, or much more commonly the Samba package built into their OS. In short, Samba is da bomb because it works the best in heterogeneous networks.

The pure open-source file-serving solutions with unquestionable patent exposure out there are not that desktop-user friendly. NFS is pretty much it, which requires a root-mount and until very recently had very little in the way of built in security features. The FuseFS packages have gone a LONG way to making this a lot easier for desktop-linux users, as it allows things like SSH/SFTP to be a file serving protocol instead of a file sharing protocol; File -> Save -> Browse to location, will work with FuseFS.