LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-04-2006, 09:00 PM   #16
jun_tuko
Member
 
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Original Poster
Rep: Reputation: 15

hello manish and bill.

it still not working. i am getting the same errors.

i've done:
1) stopping iptables.
2) disabling selinux.
3) verified that secrets.tbd exists.
4) bill - my security setting is user and not server. that was another member who posted with server security. =)

i'll be updating samba to newest release. maybe that's the culprit. all of the tutorials i've read so far regarding samba configuration were simple and straightforward. grrrrrrrr!!!

i'll check on using swat or any gui tool to try and get this thing running.

thanks guys.

again, i have FC4 with samba version: 3.0.14a-2.
 
Old 07-04-2006, 09:29 PM   #17
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
If it would help I could send you my smb.conf - send me your email address by clicking on "billymayday" to the left of this post.

btw - did you set up any users in samba?

Bill
 
Old 07-04-2006, 11:51 PM   #18
jun_tuko
Member
 
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Original Poster
Rep: Reputation: 15
hello bill and manish,

i got this thing to work on my dual-boot laptop that has FC4 in it. woohooooo!!!!
i edited too many files in the Linux box that I was working with earlier. i feel i might have messed it up.

anyway, i followed again your instructions. i created a simple smb.conf file that i copied off from one of the samba tutorials i found. here it is:

smb.conf:

# Global parameters
[global]
netbios name = SAMBA LAPTOP

[homes]
read only = No
browseable = No

[music]
path = /data/mp3
valid users = Administrator
write list = mw, Jackie

[everyone]
path = /data/everyone
valid users = Administrator
read only = No

passwords were set using smbpasswd -a anylocaluser.

i tested selinux settings (setenforce) and iptable combinations. my test results are the following:

1) setenforce 1, iptables - started and running
samba restart failed in linux; on windows, samba appeared but when clicked showed "server service is not started" message.

2) setenforce 1, iptables -F (flushed)
samba restart failed in linux; on windows, samba appeared but when clicked showed "server service is not started" message.

3) setenforce 0, iptables - started and running
samba restart went fine in linux; on windows, samba appeared but when clicked showed "server service is not started" message.

4) setenforce 0, iptables -F (flushed)
samba restart went fine in linux; on windows, samba appeared and when clicked showed the contents of my shared linux folders/files. yeahhh!!!!!!

did a few more googling and found steps that works as well.

a) go to desktop -> system settings -> security level
from there go to seLinux tab then down to modify selinux policy. search for samba from the list and click on the arrow right beside it to expose
clickable options. Mark disable selinux protection for nmbd daemon as well as for smbd daemon. click ok.

b) do this command to add rules to the iptable.
[root@localhost ~]# iptables -I INPUT -p udp -m multiport --destination-port 137,138 -j ACCEPT
[root@localhost ~]# iptables -I INPUT -p tcp -m multiport --destination-port 139,445 -j ACCEPT
[root@localhost ~]# iptables -I OUTPUT -p udp -m multiport --source-port 137,138 -j ACCEPT
[root@localhost ~]# iptables -I OUTPUT -p tcp -m multiport --source-port 139,445 -j ACCEPT
[root@localhost ~]# /sbin/iptables-save > /etc/sysconfig/iptables

c) re-run /etc/rc.d/init.d/smb restart. samba should be up and running and can be viewed by windows.

by the way, i have windows xp home edition.

whew.... 2 days worth of tinkering. it feels great though when you make it work.

thanks bill and manish!!! i appreciate it very much!!!!

Last edited by jun_tuko; 07-04-2006 at 11:56 PM.
 
Old 07-05-2006, 12:37 AM   #19
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Pleased to hear it. btw, you don't actually need to open port 445, but it's up to you.


Rgds

Bill
 
Old 07-05-2006, 01:04 AM   #20
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
I am glad to know that you finally did it. And thanks for posting the procedure. It will definitely help othere who might be stuck in similar problems. Enjoy
 
Old 07-05-2006, 02:10 AM   #21
steve-alexander
LQ Newbie
 
Registered: Mar 2005
Location: Ohio
Distribution: FC6->F7
Posts: 23

Rep: Reputation: 16
Using SAMBA between two linux systems is like Nokia calling Ericsson on a ham radio - silly. The ftp stuff is shockingly insecure and there is almost no reason to use it anymore.

1/ Set up ssh service on both systems - it's pretty trivial, select the service "sshd" under "System->Administration->Server Settings->Services", then click "start" and "save". If you want to avoid the password requests for cross system access, many howto's discuss creating ssh-keygen keys and copying them across for a sort of 'automatic login'.

2/ Using Gnome, fire up Nautilus ("Computer" icon) and select "file->connect to server", then select "ssh server" and enter the other system name or IP, then the "connect" button. This creates an icon for the network connection in the Nautilus "places".

After you do this, you can select the 'other system' Icon, dive through the folders, drag-drop/cut-paste files etc. All seamless w/ the rest of the Gnome environment. It's also secure enough to use across the internet.
 
Old 07-05-2006, 02:57 AM   #22
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Steve, you forced me to re-read the original post, and I realised I'd misread it to say he was connecting from Windows (it took me a couple of readings to realise my mistake).

Jun, as Steve says, there are simpler/better ways between Linux machines - if security isn't an issue, you can just use NFS as well.

btw Steve, I wonder how often Nokia and Erikson talk!

Rgds


Bill
 
Old 07-05-2006, 03:38 AM   #23
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
That's not a mistake billymayday. Infact there were 2 different posts; Orginal post by jun_tuko which involved Linux -> Linux file sharing and another post by ne21 which involved linux -< windows XP file sharing. That's why it all got messed up. Infact, I was confused too.
 
Old 07-05-2006, 03:42 AM   #24
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Quote:
Originally Posted by steve-alexander
Set up ssh service on both systems
Hello Steve, I haven't used ssh for filesharing yet but, I would definitely try it once. But, I have 2 questions -
1) Will there be any difference in the file transfer speed?
2) Does it work for Linux -> windows file sharing?
 
Old 07-05-2006, 08:36 PM   #25
jun_tuko
Member
 
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Original Poster
Rep: Reputation: 15
hello again gurus,

thanks for the replies and please excuse the confusion. i did want to share files between linux machines, but since i also have windows, i threw a samba question in my original post as well.

steve, thanks for your suggestion. i was about to do an ftp setup but now would rather do ssh. i think that's the best way to go. by the way, is ssh a secured version of an ftp? i guess i'll google that later.

bill and manish, seems like you guys are samba experts. so just to make it clear to myself, i should not be able to see my linux shared folder from another linux machine using samba, right? also, i just noticed in my samba linux machine that i can not open my windows shared folder. i can open my linux shared folders from windows as described on my recent post but not the other way around. did i miss a step?

bill, if you get a chance, could you please explain to me why i did not have to open port 445? would that compromise security? i just copied those lines for my iptables from a site but really, i'm clueless on what those port numbers represent.

thanks you guys!!!!!!
 
Old 07-06-2006, 04:24 AM   #26
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Quote:
Originally Posted by jun_tuko
so just to make it clear to myself, i should not be able to see my linux shared folder from another linux machine using samba, right?
Well, samba is meant for Linux <-> Windows file sharing but it works fine for Linux <-> Linux file sharing too. I have a setup at home where I share files between 2 linux machines using samba. But, if there's no involvement of windows machines, u might use ssh instead.
Quote:
Originally Posted by jun_tuko
i just noticed in my samba linux machine that i can not open my windows shared folder
What command are you using to access the windows share folders?
 
Old 07-06-2006, 04:46 AM   #27
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Jun, I don't quite recall the reasoning, but as I remember, the smb protocol only uses 445 for some form of broadcast, and really isn't necessary. In fact, if you have your firewall (in my case iptables) set to catch various types of malformed packets, Windows manages to generate a lot of log entries - hence I drop it.

I don't think it's a security issue, except to say, fewer ports open is at least as good if not better.

If you're happy with your firewall config as is - leave it.


I've never tried to access Windows shares, so I can't help there.

Rgds


Bill
 
Old 07-08-2006, 10:57 PM   #28
jun_tuko
Member
 
Registered: Oct 2005
Location: Seattle, WA
Distribution: Fedora Core 4
Posts: 67

Original Poster
Rep: Reputation: 15
hello bill and manish,

thanks again. just want to update you guys of my progress.

bill, i'll keep the 445 port setting. right now it's working so i'll leave the iptables the way it is. however, i'll jot this one down on my notes in case i ran into some logging problems.

manish, i was able to access linux-to-linux shared folders using samba. yeahhhh!!!! i found line commands to get in but it was boring since it's in a command line interface. however, i found a way to do it using guis, much better. click and drag to move files. the drawback is that, opening folders opens a new window. thus, if you have a lot of folders to open it could get crowded and confusing. i've seen ssh and it's very organized. i'll try that one out next.

for those who would like to play around samba, here's my additional notes.

linux to linux:
for gui viewing, from the client side, go to nautilus (task panel):
go to: places -> connect to server
under service type, select custom location.
on location or url field, type in:
smb://ipaddress or hostname/sharedfoldername
for connection name:
type in whatever you want to call the connection, e.g. test.

for text viewing:
on shell cli, type:
smbclient //ipaddress or hostname/sharedfoldername
then press enter.
it will show you a prompt like the one below. type in help to list available options.

smb:\>help

for more additional readings about samba configurations, here's a good link from red hat.
http://www.redhat.com/docs/manulas/e.../ch-samba.html

thanks you guys!!!!
 
Old 07-09-2006, 02:00 AM   #29
manishsingh4u
Member
 
Registered: Oct 2005
Location: Bhopal, India
Distribution: RHEL 6
Posts: 422

Rep: Reputation: 30
Quote:
Originally Posted by jun_tuko
the drawback is that, opening folders opens a new window.
Hello Jun, there's some setting in Nautilus, where u can choose to "Always open folders in browser" or something like that..I don't exactly remember which buttons to click...but, yes I have done it previously (I was using Gnome in Debian 3.1 and it was quite annoying to see a new window opening everytime I try to open a folder)

Also, if you wish to open samba shares from GUI, in addition to the proecedure you followed any one of these can be used too -
1) Run this command on the console
-->If using nautilus (gnome)
Code:
nautilus smb:/
or select "Run" applet (which you can easily add to your panel)
and type
Code:
smb:/
-->If using konqueror (KDE)
Code:
konqueror smb:/
or "Select "Run Command" from KMenu and type
Code:
smb:/
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DISCUSSION: Basic Samba Network File Sharing cdabb LinuxAnswers Discussion 17 01-27-2019 03:05 PM
Suse 10.0 File Sharing/networking, How To??? pinguino80 Linux - Networking 3 02-21-2006 10:46 AM
File Sharing in FC4 Ryan450 Fedora 1 09-01-2005 08:31 PM
RH9 <=> FC4 NFS file sharing mkatorgi Linux - Networking 2 08-30-2005 04:59 PM
Basic instructions for FTP file sharing ooagentbender Linux - Newbie 1 05-03-2004 07:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration