 |
 |
 |
 |
| Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum. |

9th December 2007, 07:40 AM
|
|
Registered User
|
|
Join Date: Mar 2007
Posts: 13

|
|
|
How do I set up a very, very samba share between 2 linux PC's
Hello,
How do I set up a very, very basic samba share between 2 linux PC's? I have done a search, but all examples seem to come back showing a Windows and Linux share.
- I need to share the following directory: /opt/Video
- I MAY want to set a user/pass for this directory as well.
Thx
|

9th December 2007, 07:42 AM
|
|
Registered User
|
|
Join Date: Mar 2007
Posts: 13

|
|
|
sorry, that should say:
How do I set up a very, very SIMPLE samba share between 2 linux PC's
|

9th December 2007, 08:45 AM
|
 |
Registered User
|
|
Join Date: Apr 2005
Location: Littleton, CO
Age: 28
Posts: 2,855

|
|
|
I think the basic problem is that samba is designed to share files between windows and linux. I think the question you really need to ask is, "How do I setup simple filesharing between two linux systems?"
|

9th December 2007, 10:59 AM
|
|
Registered User
|
|
Join Date: Jun 2005
Location: UK
Posts: 4,345

|
|
|
Hello okorkie
I use basic samba sharing Linux/Linux as well as Linux/Windows. Works pretty well and if you have it installed for Linux users it makes it fairly simple to add any visiting Windows machines.
There are some provisos though.
In Fedora - though not some other distributions - you will be able to share any directories in your homes area to yourself on another machine, but NOT to other users. There must be a way to switch that on but I've never found it.
Any shares you want to make to other users must be created off / in the file system
If you want to share things to other users, that user must have a valid user account on both boxes.
You will need to have installed the following. (The livecd versions of Fedora don't come with any of it installed):
samba
samba-client
samba-common
system-config-samba
Choose or create a folder to share.
from system-config-samba under 'Preferences' - 'Server Settings' enter a workgroup name. I use local but keep it short and I believe only one word.
Under Preferences-Samba Users, add your samba users and give them passwords. I keep the passwords the same as the Linux passwords for simplicity but they don't have to be. Samba stores its passwords separately from Linux and anytime you change a Linux password it needs to be changed on all machines in the workgroup and if you are keeping them in synchronisation in all the samba configs as well.
Add a share from the add button, make it writeable and visible and on the Access tab select who you want to have access to the share. It looks as if you can choose to give others access to shares in your home area but it doesn't appear to work.
Make sure that Samba is allowed in the firewall if you have it turned on.
In:
system-config-services
turn on:
nmb
smb
and make sure that in future these services are set to start on boot.
Now as an example:
mount -t cifs //192.168.0.13/fedora /mnt -o username=valid_samba_user
should make the share (in this case fedora) you have set on the machine 192.168.0.13 appear under /mnt on the machine you issued the command from.
If you want to address the machines by name instead of number then edit the file:
/etc/nsswitch.conf
so that the line:
hosts: files dns
reads:
hosts: files wins dns
you may well find extra entries in the hosts line, it appears important that wins appears immediately after 'files' and before any other entries.
Now the command above can be modified to read:
mount -t cifs //atx9/fedora /mnt -o username=valid_samba_user
in one of my usages. The advantage of that is that if you are using dhcp to allocate ip addresses a machines number may change but its name is constant.
That's the quick way I use for sharing, it also works for network browsing in KDE through the Konqueror browser System -Remote Places - Samba Shares.
I assume there is similar in Nautilus and Gnome?? I'll check in a minute.
Yes, just checked that, my shares appear under "Network" from the "Places" menu.
Last edited by bbfuller; 9th December 2007 at 11:07 AM.
|

9th December 2007, 01:07 PM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 268

|
|
Quote:
|
Originally Posted by leadgolem
I think the basic problem is that samba is designed to share files between windows and linux. I think the question you really need to ask is, "How do I setup simple filesharing between two linux systems?"
|
I agree. If Windows is not involved at all, I would not use samba. Perhaps NFS...
|

9th December 2007, 07:41 PM
|
|
Registered User
|
|
Join Date: Mar 2007
Posts: 13

|
|
|
Thanks for the info... Do you know what the CLI command is to see if my Linux PC is receiving SMB queries from the other PC?
~O
|

9th December 2007, 10:17 PM
|
|
Registered User
|
|
Join Date: Jun 2005
Location: UK
Posts: 4,345

|
|
|
Never needed to do that.
One way of approaching it though is to issue the command:
smbclient -L remote_machine
for instance, if I issue that command on my machine atx17 from a command prompt belonging to bbfuller:
smbclient -L atx13
after giving bbfullers password it lists all of the shares on atx13 that bbfuller has rights to access. So in a way, that's doing what you ask as atx13 must be receiving queries from atx17. You can of course run it the other way about as well if you want to check communication the other way.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 19:12 (Thursday, 23-05-2013)
|
|
 |
 |
 |
 |
|
|