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 06-05-2002, 10:56 AM   #1
Ryan_Sutton
Member
 
Registered: May 2002
Location: California
Distribution: Fedora 9
Posts: 101

Rep: Reputation: 15
Samba question


Problem with Samba, I am trying to setup Samba right now and everything seems to be setup correctly, however when I try and access the samba server from my XP computer it can't find the host. the pathway is correct and the user is correct, my NIC's are setup properly and my smb.conf file is correct I believe. The only file I have in question is my /etc/hosts files which reads
"127.0.0.1 localhost.localdomain localhost"

Suggestions welcome....

this is the current ver of Samba BTW
 
Old 06-05-2002, 12:30 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
First try if you can acces your shares from the machine when Samba is installed. If there's no X installed, use smbclient (man smbclient for help).
 
Old 06-05-2002, 04:19 PM   #3
Noerr
Member
 
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696

Rep: Reputation: 30
>>Ryan_Sutton
>>Newbie
>..everything seems to be setup correctly, however....

=>this is the best part of all posts
the "however" rules

ok,
1.) check your syntax
testparm
2.) you would find hosts from win xp regardless of /etc/hosts
3.) check hostname
hostname
4.) go to windoze command prompt and type
net view
5.)check master browser in linux by
nmblookup -M "-"
6.) try to ping linux box
7.) give us some report, ( so list won't go forever)

 
Old 06-05-2002, 04:47 PM   #4
Ryan_Sutton
Member
 
Registered: May 2002
Location: California
Distribution: Fedora 9
Posts: 101

Original Poster
Rep: Reputation: 15
1- testparm gives no errors
2-great
3-hostname is correct
4-net view showed no results
5-Showed me 3 IP addresses with __MSBROWSE__ after each one and a <1>, Looks like my Bcast, gateway and ip for the second NIC
6-no ping
7- so I guess it's not Samba that is messed up but some network setting in Linux isn't set

all advice is welcomed....
 
Old 06-06-2002, 12:52 AM   #5
Noerr
Member
 
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696

Rep: Reputation: 30
if ping doesn't work need to see your networking
do route
check default gateway and both machines and tell me where is gatway to internet
 
Old 06-06-2002, 08:36 PM   #6
Ryan_Sutton
Member
 
Registered: May 2002
Location: California
Distribution: Fedora 9
Posts: 101

Original Poster
Rep: Reputation: 15
gateway is same on both machines - 192.168.0.1
 
Old 06-07-2002, 10:12 AM   #7
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Does 192.168.0.1 exist?
 
Old 06-07-2002, 11:14 AM   #8
system
Member
 
Registered: Dec 2001
Distribution: LFS, RH, Slack
Posts: 104

Rep: Reputation: 15
did you remember that you need to add a route to 255.255.255.255? Do this with "/sbin/route add host 255.255.255.255 dev eth?" Make sure it's in your rc.local as well. Remember, just adding to rc.local without rebooting doesn't run it. You can check to see if the route exists by typing "route" and looking for an entry similar to this:
Destination Gateway Genmask Flags Metric Ref Use Iface
255.255.255.255 * 255.255.255.255 UH 0 0 0 eth0
 
Old 06-07-2002, 12:34 PM   #9
hanzerik
Member
 
Registered: Jan 2002
Location: Cheyenne Wyoming
Distribution: Debian/Raspbian/Mint
Posts: 717

Rep: Reputation: 32
Can you ping your windows box from linux?
You said you cant ping your linux box, maybe you have ipchains or iptables running?

How does your linux box get it's IP addy DHCP or static?

Looks like you are behind some sort of firewall, linksys, d-link maybe.
find the ip of your windows machine: start/run cmd ipconfig /all .
Look at your ip, gateway,dns will probably something like 192.168.0.100
255.255.255.0
192.168.0.1
Now go over to your linux box and type netconfig
Select static, ip address of 192.168.1.111 something different then your windows machine) subnet mask of (default) 255.255.255.0, gateway 192.168.0.1, and input DNS if you want the machine to access the net by using hostnames. You dont have to use DHCP, you just have to use IP's that are on the same network/subnet and use the same netmask.

Now check to see if samba is starting, Find out what runlevel you are in: type runlevel it's probably 3 or 5
Go to /etc/rc.d/rc3.d and look for a file like this S85smbd if you dont have this in either rc3.d or rc5.d then samba is'nt installed.
You can also use ntsysv to select what programs start or dont start in the current runlevel. If the file starts with a K**smbd then rename it to start with a S. Now samba should start when the computer boots. Before you start samba make sure your smb.conf (/etc/samba/smb.conf) is set up correctly. There are many examples of smb.conf on this forum so I wont go into that now, if you have problems with it then we will work on that when we get there. But I think you have a networking problem, and that needs to be fixed first.
 
Old 06-07-2002, 07:53 PM   #10
Ryan_Sutton
Member
 
Registered: May 2002
Location: California
Distribution: Fedora 9
Posts: 101

Original Poster
Rep: Reputation: 15
my 'route' displays this ....
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
Default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0

-----------------------------------------------------
When i type /sbin/route add host dev eth0 ---- it replies
"host: Host name lookup failure"

My NIC's are configured with a static IP

My windows box has the folliwing settings
ip - 192.168.0.165
subnet mask - 255.255.255.0
default gateway - 192.168.0.1

the windoze box is settup using DHCP, i use ICS / DSL so I can't set a static ip on my two windows box's

Hope that is enough info =)

Last edited by Ryan_Sutton; 06-07-2002 at 07:55 PM.
 
Old 06-08-2002, 12:10 PM   #11
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
You've got a conflict... 192.168.1.x adresses can be routed to eth0 or eth1. It's not good. You must change one of them. I understand that eth0 is where your DSL is connected and eth1 is for local network. So, change ip of eth1 to 192.168.1.0 (netmask the same as it's now). Then reconfigure Windows machines to use 192.168.1.x IPs. BTW I'm not sure about how does your network look like. Can you make a small drawing (with IPs and where is DSL connected)?
 
Old 06-08-2002, 12:46 PM   #12
Ryan_Sutton
Member
 
Registered: May 2002
Location: California
Distribution: Fedora 9
Posts: 101

Original Poster
Rep: Reputation: 15
My DSL goes into my Windows desktop computer, which is connected to my Linux desktop, which is connected to my Laptop. I don't want the Linux box to host the DSL at this time. I mainly work with my laptop and my Linux box. I'm guessing the reason my laptop can't ping my Linux box is because the laptop is settup for DHCP, and being that the DHCP has to go through the linux box to assign an ip to the laptop, maybe that is the problem? Should I set the Linux NIC's to DHCP so they can recieve an IP from my windows desktop? I prefeer to have them static. At this time I don't need the DSL to go into the linux box, I just need it to be able to share files VIA samba with my windows box's. I hope that explains my setup a little better.
 
Old 06-08-2002, 01:26 PM   #13
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Now I understand But it's still complicated.
Well, I think the easiest solution is to give Linux and the Laptop static IPs (192.168.0.x adresses).
Then routing table for Linux should be:
route add -host laptop_ip_here eth1
route add -net 192.168.0.1 netmask 255.255.255.0 eth0
route add default eth0
This should allow you to ping and use Samba. I hope there's no mistake...
 
Old 06-08-2002, 01:41 PM   #14
Ryan_Sutton
Member
 
Registered: May 2002
Location: California
Distribution: Fedora 9
Posts: 101

Original Poster
Rep: Reputation: 15
Ok, I just switched the settings on eth0 to DHCP and know I am going to set eth1 staticly, However I don't believe I can set the IP on my laptop staticly as ICS requires the use of DHCP but I think it will work with DHCP if I use one DHCP and one static set NIC in the Linux box, thx for the info, much appreciated!
 
Old 06-08-2002, 04:08 PM   #15
Noerr
Member
 
Registered: May 2002
Location: Dalec, HU
Distribution: Redhat 7.3
Posts: 696

Rep: Reputation: 30
man: to setup your network you'll need some skill. I suggest you buying a hub (4ports-doesn't cost much $30 or so), which will make things easier ~ 3x if not you need cascading network
ie
internet-----|widoze|------lan, clas0------|linux|----lan, clas1------|laptop|

you need to have two network classes since your laptop isn't directly connected to gateway. Then you will have ICS between desktop and linux and set static ips on eth1(linux) and laptop
so ips would bi like this

desktop
nic1 -public ip
nic2 -192.168.0.1
default gw your ISP ip

linux
eth0-dhcp with default gw 192.168.0.1
eth1-192.168.1.1

laptop
nic1 -192.168.1.2 default gw 192.168.1.1

+ need to setup ip forwarding on linux. plus setup routing on windows
or
setup nat on linux
 
  


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
samba smb.config question (quick question) TheDOGG Linux - Networking 1 03-02-2004 07:19 AM
Samba question Ryknow215 Linux - General 3 02-23-2004 06:11 PM
Samba question Marklar Linux - Networking 30 01-02-2004 03:44 PM
A Samba Question? gsmonk Linux - Networking 2 08-20-2003 09:14 AM
RE: Samba question pls help {Newbie question} Radiouk Linux - Networking 4 06-03-2002 06:40 PM

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

All times are GMT -5. The time now is 12:34 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