LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Samba Netbios Name Resoluion Problem (https://www.linuxquestions.org/questions/linux-networking-3/samba-netbios-name-resoluion-problem-329870/)

humbletech99 06-03-2005 05:32 AM

Samba Netbios Name Resoluion Problem
 
I've got a Samba server on Fedora Core 3 which is fine to browse to and works ok, so I decided to try a debian server as well, I set up a very simple Debian stable system and samba, and the storage share is working fine, but I can't browse to it? I can open the share by ip address, so it seems to be a Netbios problem. I don't understand because I've been going over and over the smb.conf and comparing the two. The only difference is that Debian is using domain authentication and I used SWAT on it instead of hand editing like I did on Fedora. The smb.conf is shown below:

# Samba config file created using SWAT
# from 10.137.15.30 (10.137.15.30)
# Date: 2005/06/01 17:38:23

# Global parameters
[global]
browseable = yes
workgroup = MYDOMAIN
server string = %h server
security = DOMAIN
encrypt passwords = Yes
obey pam restrictions = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
domain master = False
dns proxy = No
invalid users = root
admin users = hari
socket options = TCP_NODELAY

[printers]
comment = All Printers
path = /tmp
create mask = 0700
printable = Yes
browseable = No

[STORAGE]
browseable = yes
public = yes
comment = Storage
path = /STORAGE
valid users = me
read only = No

Also, on Fedora, I've noticed, I can't ping any windows systems by hostname either, although they can ping me by hostname. Both systems have nmbd and smbd running. Both these machines have their hostnames set as well as other general networking settings(ip,gw,netmask,broadcast etc). I must have missed something. Anyone help?

bramhastra 06-03-2005 05:42 AM

Ok can u tell both of them are different or any one of them is a domain member server

humbletech99 06-03-2005 05:57 AM

No, neither is a domain member server or master browser or anything like that.

bramhastra 06-03-2005 06:42 AM

workgroup = WORKGROUP
netbios name =
netbios aliases =
server string = Samba 2.0.5a
interfaces =
bind interfaces only = No



Why dont you give these parameters

humbletech99 06-06-2005 03:16 AM

I already tried netbios name = , but now I've tried all the others as well and none of them seem to work. To reiterate, I'm running the debian box as a file server and as member of the domain at work in order to use domain authentication. This all works fine, it's just name resolution that doesn't. Sorry, when I said the Debian box was not a member server, I was wrong, I don't know what I was thinking. It is a member server (that is, a file server that is a member of a domain - but it doesn't take place in master browser elections or authenticating domain clients or anything - ie it's not a PDC or BDC - it's just a host in the domain). hope that helps.

bramhastra 06-06-2005 03:57 AM

local master = yes
domain master = yes
browse list = yes
dns proxy = (if u have)

dont see them in the file you gave try them, if you havent


or see this site helps you or not

Quote:

http://www.unix.org.ua/orelly/samba/ch05_01.html

Geronimo 06-06-2005 04:07 AM

Is winbind running? and is the wins entry set in /etc/nsswitch.conf (that's the gentoo filename, but there should be somehting similar!)?

can your use `nmblookup <hostname>`? Get it somewhere!
And do you have a firewall? If yes, disable it temporarally for testing; and open sourceports 137-139 to get nmblookup working.

Cheers
G.

humbletech99 06-06-2005 04:23 AM

Winbind is not installed. I haven't got a firewall on it.
I don't want the debian box to be a domain master, as its at work and I want it have minimum impact on the domain.

The result of the command on the debian box is:

debian:~# nmblookup debian
querying debian on 10.255.255.255
10.137.15.70 debian<00>

Did a quick test. It is definitely a samba problem. Shut off samba on Fedora Core, couldn't ping by hostname, like debian, switched it back on and I could ping by hostname.

The Fedora box is set local master = no, so it's not this.

Browse list =yes didn't work on Debian either, Fedora doesn't have this either, but it still works.

bramhastra 06-06-2005 04:31 AM

well something different why dont you make a host entry for the samba server. See if it works

humbletech99 06-06-2005 05:49 AM

Yeah, that would work, so i did and it was ok, but i don't want to have to do that for every computer at work! I need to find out what is going on with the service and why it won't be seen by the other computers. I've uncovered that port 445 is not bound on the debian box but is on fedora. I'm convinced this is it. smbd should be bound to it but its not and i'm trying to find out why. Any Ideas?

bramhastra 06-06-2005 05:56 AM

Well try this
From 'man smbclient':

-p port
This number is the TCP port number that will be used when making connections to
the server. The standard (well-known) TCP port number for an SMB/CIFS server is
139, which is the default.

humbletech99 06-06-2005 07:02 AM

yeah, i tried that, didn't work.

I managed to get it working. The line TCP options needed:

SO_RCVBUF=8192 SO_SNDBUF=8192

This seemed to fix it and now it's listening on 445 and name resolution is working fine!

How odd, I didn't think that this would be cause, but I've been making stacks of tiny modificaitons and testing each one individually and this is the one that made it work. It was one of the last tiny differences in the configs of my Fedora and Debian boxes.

Thanks for your help everyone, especially bramhastra for quick replies, those ideas were very useful in troubleshooting!

bramhastra 06-06-2005 07:07 AM

Really something silly we missed but still like to know how did this effected the whole scenario of name resolution. I am trying to search culd you please give a reply if you know why

humbletech99 06-06-2005 07:22 AM

Not entirely sure., I might be one of those programming quirks.

Samba man page says that using socket options can cause your server to completely fail! Quote:

"Note that several of the options may cause your Samba
server to fail completely. Use these options with caution!"

It's a bit quirky because the SO_*BUF options can't even have spaces around = otherwise they won't work!

That's all I know.

bramhastra 06-06-2005 07:34 AM

I think this gives a better explanation why it is

The option read size affects the overlap of disk reads/writes with network reads/writes. If the amount of data being transferred in several of the SMB commands (currently SMBwrite, SMBwriteX and SMBreadbraw) is larger than this value, then the server begins writing the data before it has received the whole packet from the network, or in the case of SMBreadbraw, it begins writing to the network before all the data has been read from disk.

This overlapping works best when the speeds of disk and network access are similar, having little effect when the speed of one is much greater than the other.

The default value is 16384, but little experimentation has been done as yet to determine the optimal value, and it is likely that the best value will vary greatly between systems anyway. A value over 65536 is pointless and will cause you to allocate memory unnecessarily.


All times are GMT -5. The time now is 09:45 PM.