Strange problem with linux samba - SMB

This is a discussion on Strange problem with linux samba - SMB ; I'm currently using portage version of samba 3.0.14a-r2. I don't think this is a direct problem with samba. When I ping -c1 google.com 64 bytes from 72.14.207.99: icmp_seq=1 ttl=239 time=923 ms When I ping -c1 silvermountain ping: unknown host silvermountain ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Strange problem with linux samba

  1. Strange problem with linux samba

    I'm currently using portage version of samba 3.0.14a-r2. I don't think
    this is a direct problem with samba.

    When I ping -c1 google.com
    64 bytes from 72.14.207.99: icmp_seq=1 ttl=239 time=923 ms

    When I ping -c1 silvermountain
    ping: unknown host silvermountain

    When I nmblookup -S silvermountian
    querying silvermountain on 127.255.255.255
    querying silvermountain on 192.168.1.255
    192.168.1.100 silvermountain<00>
    Looking up status of 192.168.1.100
    SILVERMOUNTAIN <00> - B
    SILVERMOUNTAIN <20> - B
    MSHOME <00> - B
    MSHOME <1e> - B

    MAC Address = 00-0C-41-2B-E9-2B

    I can access shares from all my windows boxes, I can access shares on
    all the windows boxes from this linux box. Smbtree, findsmb, nbtscan,
    smbclient all work. Ping, web browsers, etc., won't resolve names like
    all other windows boxes can. I remember being able to ping my boxes by
    hostname before I accidentally defaulted some settings. If anyone knows
    what conf file could be the culprit, please let me know. Note I use
    dhcp, even though it's a small home network, so I can't control
    hostnames. I'm not running any firewall, the entire network is behind NAT.

    --
    Al Phi

  2. Re: Strange problem with linux samba

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Al Phi wrote:
    > I'm currently using portage version of samba 3.0.14a-r2. I don't think
    > this is a direct problem with samba.
    >
    > When I ping -c1 google.com
    > 64 bytes from 72.14.207.99: icmp_seq=1 ttl=239 time=923 ms
    >
    > When I ping -c1 silvermountain
    > ping: unknown host silvermountain

    [snip]
    > Ping, web browsers, etc., won't resolve names like
    > all other windows boxes can.


    What you have to realize is that Microsoft "extended" how hostname
    resolution is handled when they built the Windows TCP/IP stack.

    On Unixish systems, hostname resolution is performed through standard
    services that (typically) talk to a DNS server. So, on a unix box,
    ping silvermountain
    will talk to DNS (actually, the resolver libraries) to look for a DNS
    hostname called "silvermountain" within the default DNS domain.

    On the other hand, on a MSWindows system, hostname resolution is
    performed /first/ through the SMB name server, and if that fails, then
    through the DNS. Thus, on a MSWindows box
    ping silvermountain
    will talk to the local Microsoft SMB name server (i.e. Samba's nmbd) to
    resolve the name within the local SMB namespace.

    What you've encountered is that your linux system is not resolving
    TCP/IP host names against your Samba nmbd. This is normal; your Windows
    systems are the ones that aren't working properly.

    FWIW, you can configure your dhcp server to update your local dns server
    (assuming you have one) with the "hostname" supplied by your dhcp
    clients. If you make sure that your dhcp clients use the same "hostname"
    for both their TCP/IP hostname /and/ their SMB hostname, then DNS name
    resolves will look like they work the same as on Windows.



    - --

    Lew Pitcher, IT Specialist, Enterprise Data Systems
    Enterprise Technology Solutions, TD Bank Financial Group

    (Opinions expressed here are my own, not my employer's)
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (MingW32)

    iD8DBQFDqFEQagVFX4UWr64RAkrrAJ9UssuX0cuIZ6J99LNEw4 vLBUk70ACglOdF
    o4vCccalnRE9MK66z6FK8rw=
    =kbdo
    -----END PGP SIGNATURE-----

  3. Re: Strange problem with linux samba

    Lew Pitcher wrote:
    > What you've encountered is that your linux system is not resolving
    > TCP/IP host names against your Samba nmbd. This is normal; your Windows
    > systems are the ones that aren't working properly.
    >
    > FWIW, you can configure your dhcp server to update your local dns server
    > (assuming you have one) with the "hostname" supplied by your dhcp
    > clients. If you make sure that your dhcp clients use the same "hostname"
    > for both their TCP/IP hostname /and/ their SMB hostname, then DNS name
    > resolves will look like they work the same as on Windows.


    How would I get my linux system to resolve hostnames against Samba nmbd.
    I don't have a local dns server. Could someone give a sample named.conf
    file for bind that would allow me to do this, if I decide to go that
    route. I could also set the entire system up as static IP. I have a
    feeling it's just one configuration on my linux system that's messed up,
    though, since it used to work. I will set this up with DNS if I
    absolutely have to, but I never had to before. It just started working
    like this after a reboot (which loaded messed up confs).

    --
    Al Phi

    DC2.Dw Gm L W T Phvwflt Sks Cgr,b"Olive",s"Olive",eaq Bfl/sm#/ic A-- Fr--
    N~ M? O H $~ R+++ Ac+++! J++ S U- I V+++ Q Tc++[Java] E

  4. Re: Strange problem with linux samba

    Al Phi wrote:
    > Lew Pitcher wrote:
    >
    >> What you've encountered is that your linux system is not resolving
    >> TCP/IP host names against your Samba nmbd. This is normal; your Windows
    >> systems are the ones that aren't working properly.
    >>
    >> FWIW, you can configure your dhcp server to update your local dns server
    >> (assuming you have one) with the "hostname" supplied by your dhcp
    >> clients. If you make sure that your dhcp clients use the same "hostname"
    >> for both their TCP/IP hostname /and/ their SMB hostname, then DNS name
    >> resolves will look like they work the same as on Windows.


    Well, I solved the problem... sort of. I just created a script that
    would scan the netbios names and put them all in /etc/hosts:

    echo "127.0.0.1 localhost" > /etc/hosts
    nbtscan 192.168.1.100-150 | grep ^192.168.1.1 >> /etc/hosts

    Now all I have to do is get that to go off when something major (comp
    startup) happens. It's a small home network, so I don't have to worry
    about the hosts file being too large.

    --
    Al Phi

    DC2.Dw Gm L W T Phvwflt Sks Cgr,b"Olive",s"Olive",eaq Bfl/sm#/ic A-- Fr--
    N~ M? O H $~ R+++ Ac+++! J++ S U- I V+++ Q Tc++[Java] E

+ Reply to Thread