Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 9th December 2007, 07:40 AM
okorkie Offline
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
Reply With Quote
  #2  
Old 9th December 2007, 07:42 AM
okorkie Offline
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
Reply With Quote
  #3  
Old 9th December 2007, 08:45 AM
leadgolem's Avatar
leadgolem Offline
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?"
__________________
Only two things are infinite, the universe and human stupidity, and I am not sure about the former. -Albert Einstein-
yum -y --enablerepo=morals install honesty&
remove piratedcontent
S.C.O.U.R.G.E. Heroes of lesser renown, contributor.
Wine Basics Logitech g15 How-To Community made packages.
Reply With Quote
  #4  
Old 9th December 2007, 10:59 AM
bbfuller Offline
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.
Reply With Quote
  #5  
Old 9th December 2007, 01:07 PM
mbratch Offline
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...
Reply With Quote
  #6  
Old 9th December 2007, 07:41 PM
okorkie Offline
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
Reply With Quote
  #7  
Old 9th December 2007, 10:17 PM
bbfuller Offline
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.
Reply With Quote
Reply

Tags
linux, samba, set, share

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bluetooth PAN: How can I share my pc's net connection with my phone over BT [FC10]? HawkBoy Servers & Networking 0 30th January 2009 09:11 PM
samba share setup on linux clients jbkt23 Servers & Networking 5 26th January 2009 12:00 AM
Strange iptables and xp to linux samba share behaviour. zod786 Using Fedora 0 29th November 2008 11:18 AM
Is it possible to share PC's net connection with phone on FC6? HawkBoy Servers & Networking 0 2nd July 2007 12:06 AM
share a fat32 drive within linux over nfs? samba? 3006828 Servers & Networking 1 5th October 2006 05:41 AM


Current GMT-time: 19:12 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat