View Full Version : can't connect to samba server
paperdiesel
13th July 2004, 06:54 AM
I set up a samba share on my fc2 laptop, and I can't seem to connect to it from Windows XP or another fc2 laptop. Here's my samba server config. Keep in mind that I want it simple, no hassle, guest access where anyone can read/write/delete, etc.
config:
[global]
workgroup = boxes
netbios name = arsenal
hosts allow = 192.168.1. 192.168.2. 127.
security = share
[ paperarsenal ]
comment = whatever
path = /public
read only = no
writable = yes
guests ok = yes
browseable = yes
public = yes
the /public directory is drwxrwxrwx. What gives? I just know I'm missing something simple here..
graffg
13th July 2004, 07:14 AM
Hi!
Check your firewall settings.
bamboo_spider
14th July 2004, 03:28 AM
Hi
I agree with graffg , I too set up SAmba and nothing happened until i put off the firewall
However before you do that run a search on your windows for you Linux machine , do a search for the computer by IP and by name you will get some results. Try this before you shut your firewall and then if it does not work then try it after putting off your firewall
Once you get the computer on your win machine then share one folder that will be accessible to the win machine - map it and its done, I think
paperdiesel
15th July 2004, 09:02 AM
Hi!
Check your firewall settings.
The firewall is disabled. Always has been. I have connectivity to the linux box from XP.. I can ping it, and when I try to browse the samba drive, I get a login/password. Do I need to add a guest account to linux or something? What gives?
bamboo_spider
15th July 2004, 09:33 PM
Hi
I am new but managed to setup one way Samba (can access it from win xp not the otherway around)
Try and make a login in FC which has the same name as the win machine and then try the suggestions give in my earlier post.
Don't know anthing about command line so I do everything graphically.
Also visit page in forum Software / Samba Mounting Problems
Something is bound to work (thats a windows type reply :( ]
Bamboo
PIII Laptop
20 GB HDD (make ??)
386 mb RAM
FC1 (no dual bootup)
Uttaranchal India
Jaws
16th July 2004, 02:02 AM
Sorry for hijacking this thread -- but I am having the same problem. ._. Once I disabled my firewall though, samba started working. So my question is, how do I configure iptables to allow the samba server to communicate with the other computers on my network?
Again, sorry for hijacking this thread. -_-
-Jaws
ghaefb
16th July 2004, 02:10 AM
The easiest way is to flush all iptables rules.
(must be root)
/usr/sbin/iptables -F
Jaws
16th July 2004, 02:14 AM
The easiest way is to flush all iptables rules.
(must be root)
/usr/sbin/iptables -F
If I do that, will all my ports be open? I want this computer to be as safe as it can be, since it will be online 24 x 7, and it will be run as a server.
Thanks. :)
-Jaws
wreichert
16th July 2004, 03:04 AM
Seems the security=share is broken in the 3.0.3 FC2 samba. You shouldn't be prompted for a username / password with this setting. I installed the FC1 3.0.4 & everything works fine. Other option is to use the dev tree for yum, its currently at 3.0.5pre1.
Wil
Ned
16th July 2004, 04:40 AM
The firewall is disabled. Always has been. I have connectivity to the linux box from XP.. I can ping it, and when I try to browse the samba drive, I get a login/password. Do I need to add a guest account to linux or something? What gives?
Yes, you need to set up a samba account on the linux box. The easiest way is to create users with exactly the same username/password as their WinXP accounts their trying to connect from.
Ned
Ned
16th July 2004, 05:03 AM
If I do that, will all my ports be open? I want this computer to be as safe as it can be, since it will be online 24 x 7, and it will be run as a server.
Thanks. :)
-Jaws
Yes, don't do that!
You need to open ports 137, 138, and 139 used by the NetBIOS service so your Samba server can broadcast it's existance and clients can connect to it. Only open these ports for your internal lan :)
$ iptables -A INPUT -p ALL -i eth0 -s 192.168.0.1 --destination-port 137:139 -j ACCEPT
If you're unfamiliar with iptables, this will open traffic for all protocols (tcp, udp, icmp) to your local ethernet port 0 from ip 192.168.0.1 (your XP machine wanting to connect) on ports 137-139. Add additional lines for each ip address to be allowed to access or change to -s 192.168.0.0/24 which is the same as a 255.255.255.0 subnet mask to open up access from all IPs in the 192.168.0 range (or whatever private ip address range you're using on your lan).
If you're worried, you can use something like the Shilds Up (www.grc.com) website after tinkering with your firewall to make sure you haven't opened anything that shouldn't be to the whole world - if you've done it right, samba should work and ports 137-139 should still be stealthed to the outside world :)
Ned
Jaws
16th July 2004, 05:08 AM
Thanks Ned. That seemed to do what I wanted ! :)
-Jaws
Ned
16th July 2004, 05:13 AM
Thanks Ned. That seemed to do what I wanted ! :)
-Jaws
No problem :)
There are some excellent tutorials for iptables around on the web - it's not that difficult to learn - you don't need to be a programmer - and is sooo powerful. It's a REALLY worthwhile investment of your time :)
Ned
paperdiesel
16th July 2004, 05:31 AM
Seems the security=share is broken in the 3.0.3 FC2 samba. You shouldn't be prompted for a username / password with this setting. I installed the FC1 3.0.4 & everything works fine. Other option is to use the dev tree for yum, its currently at 3.0.5pre1.
Wil
How do I gracefully get and install a newer version of samba? What's the yum command (I've never really used yum)?
I don't think I should have to create the winxp user accounts on my linux box. The reason being that I have another linux box, sitting right next to it, running fedora core 1, and it has the exact same samba config (names changed), and works perfectly. I never added any winxp users to that box. I'm almost positive that security=share opens the drive to anyone.
EDIT: Here's the LogWatch entry for samba:
smbd/service.c:make_connection_snum(619) shea (edited IP addy) connect to service paperarsenal initially as user nobody (uid=99, gid=99) (pid 18556) : 1 Time(s)
What gives?
wreichert
16th July 2004, 07:55 AM
yum is a handy commandline tool for keeping your system up to date, its essentially the Debian apt command for rpms. Does lots of stuff but simply try 'yum update' & it'll automatically download & update all the packages on yer system.
If you just want update samba files snag samba* from:
http://mirrors.kernel.org/fedora/core/development/i386/Fedora/RPMS/
I think the default user for samba connects is 'nobody', not completely certain tho.
Wil
captain-cat
20th July 2004, 02:13 PM
a simpler way in fedora is to go to System Settings->Security Level and add to other ports
137:udp, 138:udp, 139:tcp, 445:tcp and it will add the iptables rules to your /etc/sysconfig/iptables file
arick
21st July 2004, 03:54 PM
I heard about yum while browsing the samba thread. However, when I ran it, I got the following:
root@Anar root]# yum -y -t update
Gathering header information file(s) from server(s)
Server: Fedora Core 2 - i386 - Base
Server: Dag RPM Repository for Fedora Core
Server: Fedora Linux 2 - $basesearch - freshrpms
Server: Fedora Core 2 - i386 - Released Updates
Finding updated packages
Downloading needed headers
Resolving dependencies
.....Unable to satisfy dependencies
Package gkrellm-wireless needs gkrellm = 2.1.28-3, this is not available.
paperdiesel
22nd July 2004, 02:55 AM
Well I just ran "yum -y update", which updates all packages on the system and answers "yes" to all questions. It finished with no problems, and now my samba server works with no problems. Turns out that the person who posted about my version of samba having a bug in it was correct - the version of samba that comes with a fresh install of fedora core 2 does not handle security=share properly.
Is it just me, or does fedora core 2 have a larger number of bugs than fedora core 1 did? Oh well, still not complaining. I <3 fc.
Ned
22nd July 2004, 01:17 PM
Yes, I agree, there are far too many bugs in FC2 compared to FC1. What's more annoying is that many of these were reported and fixed a long time ago but updates in the official FC2 updates tree are yet to appear.
This Samba bug is a case in point - it was fixed in FC1 on 9th June with the release of Samba-3.0.4 yet FC2 users are left to work it out for themselves. Why wasn't the Samba-3.0.4 update released for FC2 at the same time?
Ned
ravervx
31st August 2004, 02:19 AM
Hey guys, how did you use yum to update samba to version 3.0.4 or 3.0.5?
I did the yum -y update and was not able to update my samba.
Ned
31st August 2004, 08:56 AM
You'll need to point your yum config file towards a repository that has the updated samba files.
They're still not present in the official fedora core 2 updates dir. Version 3.0.5 is in the testing dir but Samba still has never officially made it into updates :confused:
Ned
superbnerd
31st August 2004, 11:55 AM
it really helps when you enable "wins support" and set the host lookup order to start with wins, this will also allow you to browse the network using natilus. and you must manually tell the client the ip of the wins server (usually the samba server) only if they have static ips. if they get there info from dhcp, make sure the dhcp tells them the ip of the wins server. also be sure to open the necessary ports (i think they are 138 and 139 udp/tcp)
Ned
2nd September 2004, 02:15 PM
Yes, I agree, there are far too many bugs in FC2 compared to FC1. What's more annoying is that many of these were reported and fixed a long time ago but updates in the official FC2 updates tree are yet to appear.
This Samba bug is a case in point - it was fixed in FC1 on 9th June with the release of Samba-3.0.4 yet FC2 users are left to work it out for themselves. Why wasn't the Samba-3.0.4 update released for FC2 at the same time?
Ned
At last !
An update for samba (version 3.0.6-2) has at last appeared in the official FC2 updates. Anyone updated to this yet and is it working OK?
Ned
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.