Obtaining WINS server address from DHCP - SMB

This is a discussion on Obtaining WINS server address from DHCP - SMB ; Hello, I am running a Linux box as a DHCP & WINS client (i.e not a server in any way) and I want it to register its name and assigned address on the WINS server given in the DHCP response ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Obtaining WINS server address from DHCP

  1. Obtaining WINS server address from DHCP

    Hello,

    I am running a Linux box as a DHCP & WINS client (i.e not a server in any
    way) and I want it to register its name and assigned address on the WINS
    server given in the DHCP response (just like a windows client would). At
    present I have to hardcode the WINS server addresses in the smb.conf file
    (wins server = 149.184.179.128 129.184.178.130) but this is not good as they
    can sometimes be different.
    In the smb.conf file comments it appears that it is possible as it states on
    the next line:

    # Windows Internet Name Serving Support Section:
    # WINS Support - Tells the NMBD component of Samba to enable its WINS Server
    ; wins support = no

    # WINS Server - Tells the NMBD components of Samba to be a WINS Client
    # Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
    wins server = 149.184.179.128 129.184.178.130

    #HERE>>>
    # If we receive WINS server info from DHCP, override the options above.
    include = /etc/samba/dhcp.conf

    Any ideas? thanks



  2. Re: Obtaining WINS server address from DHCP

    Dan Earle wrote:
    ....
    > # If we receive WINS server info from DHCP, override the options above.
    > include = /etc/samba/dhcp.conf


    Does the file /etc/samba/dhcp.conf exist? What does it contain?

    Mogens

    --
    Mogens Kjaer, Carlsberg A/S, Computer Department
    Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
    Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
    Email: mk@crc.dk Homepage: http://www.crc.dk

  3. Re: Obtaining WINS server address from DHCP

    The file /etc/samba/dhcp.conf does not exist.
    Dan.

    "Mogens Kjaer" wrote in message news:4524B3BE.1050204@crc.dk...
    > Dan Earle wrote:
    > ...
    >> # If we receive WINS server info from DHCP, override the options above.
    >> include = /etc/samba/dhcp.conf

    >
    > Does the file /etc/samba/dhcp.conf exist? What does it contain?
    >
    > Mogens
    >
    > --
    > Mogens Kjaer, Carlsberg A/S, Computer Department
    > Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
    > Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
    > Email: mk@crc.dk Homepage: http://www.crc.dk




  4. Re: Obtaining WINS server address from DHCP

    Dan Earle wrote:
    > The file /etc/samba/dhcp.conf does not exist.


    If you google a little you can find a patch
    to /sbin/dhclient-script that generates this file
    automagically:

    http://66.249.93.104/search?q=cache:...n&ct=clnk&cd=7

    It's for debian, so it might need some adjustments;
    save a copy of dhclient-script in a safe place.

    Mogens


    --
    Mogens Kjaer, Carlsberg A/S, Computer Department
    Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
    Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
    Email: mk@crc.dk Homepage: http://www.crc.dk

  5. Re: Obtaining WINS server address from DHCP

    Thanks a lot Mogens!

    My /etc/dhclient-script is slightly different around here:
    # Invoke the local dhcp client enter hooks, if they exist.
    if [ -f /etc/dhclient-enter-hooks ]; then

    ....but i think i will work it out, I will let you know

    Dan


    "Mogens Kjaer" wrote in message news:45250BB9.6010409@crc.dk...
    > Dan Earle wrote:
    >> The file /etc/samba/dhcp.conf does not exist.

    >
    > If you google a little you can find a patch
    > to /sbin/dhclient-script that generates this file
    > automagically:
    >
    > http://66.249.93.104/search?q=cache:...n&ct=clnk&cd=7
    >
    > It's for debian, so it might need some adjustments;
    > save a copy of dhclient-script in a safe place.
    >
    > Mogens
    >
    >
    > --
    > Mogens Kjaer, Carlsberg A/S, Computer Department
    > Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
    > Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
    > Email: mk@crc.dk Homepage: http://www.crc.dk




  6. Re: Obtaining WINS server address from DHCP

    It works

    Also had to add request for netbios name server address (WINS) to
    /etc/dhclient.conf:

    request netbios-name-servers;

    Thanks again Mogens

    "Dan Earle" wrote in message
    news:4526199b$0$59464$ed2619ec@ptn-nntp-reader03.plus.net...
    > Thanks a lot Mogens!
    >
    > My /etc/dhclient-script is slightly different around here:
    > # Invoke the local dhcp client enter hooks, if they exist.
    > if [ -f /etc/dhclient-enter-hooks ]; then
    >
    > ...but i think i will work it out, I will let you know
    >
    > Dan
    >
    >
    > "Mogens Kjaer" wrote in message
    > news:45250BB9.6010409@crc.dk...
    >> Dan Earle wrote:
    >>> The file /etc/samba/dhcp.conf does not exist.

    >>
    >> If you google a little you can find a patch
    >> to /sbin/dhclient-script that generates this file
    >> automagically:
    >>
    >> http://66.249.93.104/search?q=cache:...n&ct=clnk&cd=7
    >>
    >> It's for debian, so it might need some adjustments;
    >> save a copy of dhclient-script in a safe place.
    >>
    >> Mogens
    >>
    >>
    >> --
    >> Mogens Kjaer, Carlsberg A/S, Computer Department
    >> Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
    >> Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
    >> Email: mk@crc.dk Homepage: http://www.crc.dk

    >
    >




  7. Re: Obtaining WINS server address from DHCP

    actually u need:

    request subnet-mask, broadcast-address, time-offset, routers, domain-name,
    domain-name-servers, host-name, netbios-name-servers;

    "Dan Earle" wrote in message
    news:452664fb$0$26916$ed2e19e4@ptn-nntp-reader04.plus.net...
    > It works
    >
    > Also had to add request for netbios name server address (WINS) to
    > /etc/dhclient.conf:
    >
    > request netbios-name-servers;
    >
    > Thanks again Mogens
    >
    > "Dan Earle" wrote in message
    > news:4526199b$0$59464$ed2619ec@ptn-nntp-reader03.plus.net...
    >> Thanks a lot Mogens!
    >>
    >> My /etc/dhclient-script is slightly different around here:
    >> # Invoke the local dhcp client enter hooks, if they exist.
    >> if [ -f /etc/dhclient-enter-hooks ]; then
    >>
    >> ...but i think i will work it out, I will let you know
    >>
    >> Dan
    >>
    >>
    >> "Mogens Kjaer" wrote in message
    >> news:45250BB9.6010409@crc.dk...
    >>> Dan Earle wrote:
    >>>> The file /etc/samba/dhcp.conf does not exist.
    >>>
    >>> If you google a little you can find a patch
    >>> to /sbin/dhclient-script that generates this file
    >>> automagically:
    >>>
    >>> http://66.249.93.104/search?q=cache:...n&ct=clnk&cd=7
    >>>
    >>> It's for debian, so it might need some adjustments;
    >>> save a copy of dhclient-script in a safe place.
    >>>
    >>> Mogens
    >>>
    >>>
    >>> --
    >>> Mogens Kjaer, Carlsberg A/S, Computer Department
    >>> Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
    >>> Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
    >>> Email: mk@crc.dk Homepage: http://www.crc.dk

    >>
    >>

    >
    >




+ Reply to Thread