/etc/host file question. - Suse

This is a discussion on /etc/host file question. - Suse ; I have a small home network with 2 Linux and 1 Windows pc connected with a router to the internet. This is what I have in my /etc/host file: ************************************************** *********************** # # hosts This file describes a number of ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: /etc/host file question.

  1. /etc/host file question.

    I have a small home network with 2 Linux and 1 Windows pc connected with a
    router to the internet.

    This is what I have in my /etc/host file:

    ************************************************** ***********************
    #
    # hosts This file describes a number of hostname-to-address
    # mappings for the TCP/IP subsystem. It is mostly
    # used at boot time, when no name servers are running.
    # On small systems, this file can be used instead of a
    # "named" name server.
    # Syntax:
    #
    # IP-Address Full-Qualified-Hostname Short-Hostname
    #

    127.0.0.1 localhost
    192.168.1.101 kubuntu
    192.168.1.102 toshiba
    ************************************************** **********************

    In the header of the host file is written:
    On small systems, this file can be used instead of a
    "named" name server.

    But when I write in Konqueror:
    smb://toshiba
    I get error message:

    The given name could not be resolved to a unique server.
    Make sure your network is setup without any name conflicts
    between names used by Windows and by UNIX name resolution.

    When I write
    smb://192.168.1.102 than it's ok.

    What am I doing wrong here?

    Henk

  2. Re: /etc/host file question.

    Henk Oegema wrote:

    > 127.0.0.1 localhost
    > 192.168.1.101 kubuntu
    > 192.168.1.102 toshiba
    > ************************************************** **********************
    >
    > In the header of the host file is written:
    > On small systems, this file can be used instead of a
    > "named" name server.
    >
    > But when I write in Konqueror:
    > smb://toshiba
    > I get error message:
    >
    > The given name could not be resolved to a unique server.
    > Make sure your network is setup without any name conflicts
    > between names used by Windows and by UNIX name resolution.
    >
    > When I write
    > smb://192.168.1.102 than it's ok.
    >
    > What am I doing wrong here?


    Well, first of all the naming of your systems are not realy consitant.
    e.g. the kubuntu will need to be renamed if you put something else on
    it. The toshiba will be confusing the moment you get a second toshiba.

    That said, try restarting konquror. Probably it loads the file somehow.

    Also do a 'ping toshiba' and see what happens.

    houghi
    --
    If God doesn't destroy Hollywood Boulevard, he owes Sodom and
    Gomorrah an apology.

  3. Re: /etc/host file question.

    On 2007-06-17, Henk Oegema wrote:

    > 127.0.0.1 localhost
    > 192.168.1.101 kubuntu
    > 192.168.1.102 toshiba
    > ************************************************** **********************


    I've never tried to put just short names. Just tried it now, it works.

    But just in case, try using:

    192.168.1.101 kubuntu.mydomain.org kubuntu

    192.168.1.102 toshiba.mydomain.org toshiba

    Set mydomain.org in your router, if you can.
    Otherwise, try putting the domain of you provider in.

    > But when I write in Konqueror:
    > smb://toshiba
    > I get error message:
    >
    > The given name could not be resolved to a unique server.
    > Make sure your network is setup without any name conflicts
    > between names used by Windows and by UNIX name resolution.


    Not a unique name? Could there be a double?

    Try removing the lines, or putting them in comments.
    Then 'nslookup 192.168.1.101'.
    If he gives you the name, you might have a DNS service in your router.


    --
    There is an art, it says, or rather, a knack to flying.
    The knack lies in learning how to throw yourself at the ground and miss.
    Douglas Adams

  4. Re: /etc/host file question.

    On Jun 17, 12:11 pm, Henk Oegema wrote:
    > I have a small home network with 2 Linux and 1 Windows pc connected with a
    > router to the internet.
    >
    > This is what I have in my /etc/host file:
    >
    > ************************************************** ***********************
    > #
    > # hosts This file describes a number of hostname-to-address
    > # mappings for the TCP/IP subsystem. It is mostly
    > # used at boot time, when no name servers are running.
    > # On small systems, this file can be used instead of a
    > # "named" name server.
    > # Syntax:
    > #
    > # IP-Address Full-Qualified-Hostname Short-Hostname
    > #
    >
    > 127.0.0.1 localhost
    > 192.168.1.101 kubuntu
    > 192.168.1.102 toshiba
    > ************************************************** **********************
    >
    > In the header of the host file is written:
    > On small systems, this file can be used instead of a
    > "named" name server.
    >
    > But when I write in Konqueror:
    > smb://toshiba
    > I get error message:
    >
    > The given name could not be resolved to a unique server.
    > Make sure your network is setup without any name conflicts
    > between names used by Windows and by UNIX name resolution.
    >
    > When I write
    > smb://192.168.1.102 than it's ok.
    >
    > What am I doing wrong here?
    >
    > Henk


    My understanding of this - probably totally wrong - is: you might have
    fun with these names, trying to access the toshiba or kubuntu websites.


  5. Re: /etc/host file question.

    Vlad_Inhaler wrote:
    > My understanding of this - probably totally wrong - is: you might have
    > fun with these names, trying to access the toshiba or kubuntu websites.


    It is totaly wrong. http://toshiba is completely different to
    http://toshiba.com The fact that browsers add the .com is another
    matter and unrelated.

    houghi
    --
    If God doesn't destroy Hollywood Boulevard, he owes Sodom and
    Gomorrah an apology.

  6. Re: /etc/host file question.

    Normally it should also work with a short name I think. Maybe the
    problem is a url prefix that is automatically added in /etc/
    resolv.conf when the searched link can not be resolved.

    Blackd



  7. Re: /etc/host file question.

    > When I write
    > smb://192.168.1.102 than it's ok.
    >
    > What am I doing wrong here?
    >
    > Henk


    Henk,

    1. Is the nmbd daemon running ?
    2. If yes, then how is your /etc/samba/smb.conf looking ? I'm speaking
    more specifically about your [global] section. Is there a line like
    "wins support = Yes" ? There should be, to be sure.
    3. If both of these are OK, then exactly which of your 3 machines
    doesn't find the named samba hosts ? Needless to say (I hope) : make
    sure after every modification to smb.conf to restart smbd as well as
    nmbd /etc/init.d/smb stop
    /etc/init.d/nmb stop
    /etc/init.d/nmb start
    /etc/init.d/smb start
    4. No firewall issues on port 139 (the nmbd port), by the way ? Maybe
    check in Yast if the smb (and nmb ?) service can get through the
    firewall (personally I don't think this will be your problem, but I
    just mention it to -hopefully- be complete)

    Kind regards,

    PhB


+ Reply to Thread