Click to See Complete Forum and Search --> : Basic Samba access to MDK 9.0 from Win XP Pro


ThomasNichols
05-31-2003, 06:34 PM
Good Day,

I'm having some problems getting a Win XP Pro machine ("cal") to see a Samba server on a Mandrake 9.0 box ("gan"). Samba version is 2.2.7.
gan - 10.0.0.27 - Linux Mandrake 9.0
cal - 10.0.0.15 - Win XP Pro

On gan, running
smbclient -L gan
browses the shares fine -- see below. However, from the Win XP Pro box I cannot even browse the workgroup name in My Network Places -- from "net view \\gan" I get
"Nich is not accessible. You might not have permission to use this network resource." (Nich is workgroup name).
cal can ping gan (and vice versa) and ssh to it without problems.

I have tried every smb.conf config I can think of, ranging from empty to copies of previous configs that worked fine (earlier versions of Mandrake, with WinNT and Win2000). Current settings given below.
I've worked through DIAGNOSIS.txt, and also the troubleshooting chapters in "Teach Yourself Samba in 24 Hours" -- and I'm completely stumped:
- OK to step 6, nmblookup -d 2 `*' -- at which point I get
added interface ip=10.0.0.27 bcast=10.0.0.255 nmask=255.255.255.0
querying * on 10.0.0.255
name_query failed to find name *

Step 7, "Connecting to a Share Locally" with smbclient, works fine - see listing below.
Step 8 gives error 53, "The network path was not found."


- "gan" is in the Windows HOSTS file - i.e c:\windows\system32\drivers\etc\hosts on cal. I've read reports that this prevents the workgroup being used, but with or without it net view \\gan returns error 53.
- I've tried with "gan" in LMHOSTS rather than HOSTS on cal - same directory - and also with it in both. Reloaded LMHOSTS with nbtstat - R between edits.
- I've tried both with and without the "remote announce..." and "nt acl support = no" options in smb.conf
- Internet Connection Firewall is not enabled

... and whatever I try, I get System Error 53.

From the docs it seems that "interfaces" may be the parameter I need -- I've read the man pages, tried
interfaces = eth0 10.10.10.15/24 10.10.10.15/255.255.255.0
but that just causes nmbd startup to break.

Please can anyone suggest an appropriate course of action / set of documentation I can use to resolve this problem? Any suggestions would be very welcome.

Thanks for your attention,
Thomas.





==== smbclient tests OK ====

#smbclient -L ganymede -U thomasn
added interface ip=10.10.10.27 bcast=10.10.10.255 nmask=255.255.255.0
Password: *** WinXP password, as recorded with smbpasswd -a ***
Domain=[NICH] OS=[Unix] Server=[Samba 2.2.7]

Sharename Type Comment
--------- ---- -------
homes Disk
tmp Disk temporary files
IPC$ IPC IPC Service (Samba 2.2.7)
ADMIN$ Disk IPC Service (Samba 2.2.7)
thomasn Disk Home directory of thomasn

Server Comment
--------- -------
GAN Samba 2.2.7

Workgroup Master
--------- -------
NICH GAN


==== current smb.conf ====

[global]
netbios name = gan
workgroup = NICH
security = user
log file = /var/log/samba/log.%m
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd

[homes]
guest ok = yes
read only = no

[tmp]
comment = temporary files
path = /tmp
read only = no
nt acl support = no

--------------------------------

cowanrl
06-01-2003, 09:30 AM
Many times that "Network path not found" error on a Windows machine trying to view or access a share on a Samba server indicates a firewall on the Linux machine blocking the SMB traffic. Try shutting down your firewall and then accessing the Samba server.
Many times a default install of Linux will set up a firewall and you may not be aware of it.

Try executing as root either:

iptables -F

or

ipchains -F

to flush the firewall, then try accessing the share from the Windows machine.

Besides that, there's a few peculiarities in your post that may just be typos but you need to clarify them.

First, I see 2 separate IP subnets referenced to, 10.0.0.0/24 and 10.10.10.0/24. Is that a typo or do you have 2 NICs in your Linux machine?

Also, in your smbclient command, you refer to the Samba server name as ganymede but everywhere else it's referenced as gan. A typo?

rustyml
06-01-2003, 09:47 AM
Thomas, if I understand you correctly, you're having problems trying to browse your linux machine through network neighborhood on the windows machine. What works for me is under [global], change security to security = share instead of user. That seemed to work for me.

ThomasNichols
06-02-2003, 12:04 AM
Hurrah! Thank you cowanrl! Shorewall, added as a standard feature in Mandrake 9.0, was indeed blocking the netbios ports. Studying www.shorewall.net and some introductory iptables docs was fairly baffling - but using drakconf / Security / Firewall / Advanced and adding
137/udp 138/udp 139/udp 137/tcp 138/tcp 139/tcp
works just fine - I can see my Samba shares from WinXP! The birds outside have started singing a happy chorus :-)

This has added the following to my /etc/shorewall/rules file:
rules:ACCEPT net fw udp 631,137,138,139 -
rules:ACCEPT net fw tcp 80,443,22,631,137,138,139 -

I'd like to restrict NetBIOS access so that these ports are only accessible from specific machines (IP addresses). Is this straightforward? Maybe I should repost a separate query with pertinent Subject line.

I've managed to lock up my Linux box so I can't ssh on to it by manually editing the rules file - need to be a little more cautious...

Thanks again!
Thomas.

cowanrl
06-02-2003, 06:38 AM
You're welcome.

I think a new post is definitely in order to deal with your firewall question. I probably can't help with that one.

ThomasNichols
06-02-2003, 06:58 AM
Will post now.
Regards,
Thomas.