Click to See Complete Forum and Search --> : NFS vs. Samba


heckle
07-23-2002, 06:34 AM
Can someone list some pros and cons of NFS and Samba??

I am trying to decide which one would be better to use for file sharing within a linux setup.

ntt.
07-23-2002, 06:45 AM
If it's purely *nix machines, I'd use NFS because it's the native *nix file sharing system.

cowanrl
07-23-2002, 08:58 PM
If you are only using Linux/Unix machines, NFS is much simpler to work with.
However, if security is a concern, I think Samba is more secure and easier to keep unwanted users out of.

Alex Cavnar, aka alc6379
07-24-2002, 01:08 AM
Originally posted by cowanrl
If you are only using Linux/Unix machines, NFS is much simpler to work with.
However, if security is a concern, I think Samba is more secure and easier to keep unwanted users out of.

I dunno... NFS is secure enough for that, if you know what you're doing. It's simple to configure, and it has standard UNIX permissions on it, so you can use groups to keep out whoever you like.

I'd recommend Samba for a primarily mixed environment with *nix and Windoze. It can even be used as a domain controller in an NT domain.

So, as it was stated before, NFS == *nix environment, Samba == mixed *nix/Windows setting. You can use Samba in a pure *nix setting, but why not use something native to the *nix world?

cowanrl
07-24-2002, 04:44 AM
The problem with NFS is that it doesn't prompt for or check for a password when a user mounts a share.
If I create a user account on a client computer with a uid that matches a uid on the NFS server, I can access whatever directories that uid has permissiones to. The passwords don't have to match.
This can be overcome obviously but it'd be a lot simpler if NFS checked passwords.

curtas
07-24-2002, 10:00 AM
If I'm reading this right, then I can set up my network to run Samba shares on both the Win and RedHat boxes?

Right now I have Samba set up to share data drives with WinXP Pro, and Win2000. I have NFS set up to share the data drives with the Unix (RH 7.0 to 7.3 and Irix).

All the samba information I've found was with respect setting up windows clients. If there's a way to do the shares in Unix using Samba, please let me know how (or point to a website).

To answer the original question: NFS for a unix network, Samba to share with Windows -- those are the easiest (and sometimes only approaches, depending on your network makeup). Samba is a bit harder to set up, but I just followed the FAQ and HOWTO and it was a snap. Now if I could just set up my unix samba clients . . .

good luck,
ac

vxmine
07-24-2002, 12:01 PM
If you have a mixture of nix and windows machines I would use Samba for the windows machines and NFS for the nix machines. I have this same setup for my domain. I have a RH7.3 box running Samba services and NFS services. My users ( all windows) connect using Samba and my Laptop(Linux) uses nfs to connect. Having a mixed environment is kind of weird....windows = smb and no nfs(but nfs software can be purchased),
linux = nfs and no smb(this is where Samba comes in).

Good Luck!

cowanrl
07-24-2002, 12:03 PM
Yes you can access those Samba shares from Linux and Unix clients. For Linux, the Samba client commands are smbmount, smbumount and smbclient. You can also use the mount command if you specify a file type of smbfs. Unix does not use the smbmount command. I can't remember off the top of my head what command replaces it. I don't use Unix but I know you can mount Samba shares with it.

On your Linux machines, there should be man pages on all of those client commands. If you have SWAT installed, there is some excellent help that comes with it on the client commands.
If you go to the Networking Linux forum on this site and do a search on smbclient or smbmount over the last 3 months or so, you'll find probably hundreds of posts on those subjects, some providing great detail.

I'm sure you can also find some documentation at www.samba.org.

There's really no need to run both NFS and Samba.

happybunny
02-23-2004, 10:53 AM
Is there an issue sharing a folder using both NFS and smb?

Example:

/data/share shared out using nfs (exports.conf) and smb (smb.conf)?

I assume NFS is faster access via linux to linux, and since Windows cannot use NFS, use smb for the same folder?

thaddaeus
02-24-2004, 02:24 AM
There shouldn't be any problems sharing single directories, they only get "refrenced".

my 3 cents:
i would use samba even for nix OSs, its not hard at all to do some basic sharing with a mix of protected folders and open folders via security = share, and i don't know about nfs (havn't played with it yet) but samba its easy to set a windows login complete with localised directories for each user along with logs about what each user does, and along with swat it can be done easily from any browser connected to the server. My current settup for a WinXP Win2000 and FedoraC1 and (server)mandrake 9.2. has two "open" unsecure shares and a home directory for any linux->samba user, very simple setup too with swat and webmin. No other user can see the other share because the home path = /server/home/%U so it goes directly to the users home and never gets a glimpse of any other users files...