LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   share a directory between linux machine (https://www.linuxquestions.org/questions/linux-software-2/share-a-directory-between-linux-machine-4175472188/)

jokar.mohsen 08-05-2013 10:31 AM

share a directory between linux machine
 
Hello Folks.
I use Debian and want share a directory on my local hdd to a fedora machine, How can I use SAMBA to do it?
I can use sftp and ssh but Samba not work :(.

Thanks.

Cheers.

jpollard 08-05-2013 10:46 AM

Samba is designed to support windows.

Try NFS or Gluster (gluster is faster).

sundialsvcs 08-05-2013 11:03 AM

Start by reading-up thoroughly on how Samba actually works in Linux. It's a shared file system, much like NFS or anything else, and thus has nothing at all to do with ssh, sftp and so-forth. The fastest way to find the answers you're looking for is to do your research ahead of time, then to ask pointed, clarifying questions here. A forum-thead is no substitute for (literally) hundreds of web-site pages on the subject.

frankbell 08-05-2013 08:47 PM

A short answer to "how to use Samba" to share a directory is this:
  1. Mark the directory shared in the directory properties (you can use your file manager to do this, but you will need to be root).
  2. Configure your /etc/samba/smb.conf file to share the directory.
  3. Create user names and passwords for the logins who you wish to have access to the directory (to some extent, this depends on how you set up /etc/samba/smb.conf).
  4. Add them to your samba password file. Generally this is done with the smbpasswd command. as root.
A shorter answer is to see Samba by Example, which is the friendliest guide to Samba that I have found.

If you ever want someone using Windows to have access to the share, Samba is the way to go.

jpollard 08-06-2013 01:39 AM

The problem with using Samba for sharing between Linux systems is due to having to first translate the client UNIX style access into a Windows style access (problematical - usually works, but not always), then Samba has to translate that Windows access back into a Linux access... again, usually works for simple things, but not always.

You also have to store the password three times - on the server, on the client, AND in Samba.

So if you ever need to change the password... you have to do it three time. NFS, you store it twice - on the server, and on the client - using the same method on both.

chrism01 08-06-2013 06:55 AM

For NFS the client box IP must be within the range set by the servers /etc/exports file entry.
The uid (for full access/ctrl) of the client user must be the same on the both ends.
Neither of these is affected by the user's password(s).


All times are GMT -5. The time now is 02:45 PM.