[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to change dynamic DNS settings in SAMBA

Posted on 2006-04-25
6
Medium Priority
?
620 Views
Last Modified: 2008-01-09
I inherited a SAMBA server (Firewall) at this time the users can not get to the internet.
I check and the DNS servers they were using were changed (or not working) so I called Comcast (their ISP) and got the correct DNS information.
All the PC in the office are DHCP, because I do not know how to change the DNS settings in SAMBA I changed the settings on the PCs to use the new DNS settings.
Now I would like to configure the SAMBA server (DHCP server) to update DNS automatically as the IP is dynamic.

You help is much appreciated.
Mark
0
Comment
Question by:mspencer100
6 Comments
 
LVL 15

Expert Comment

by:m1tk4
ID: 16539708
Ok, just to set things strait - SAMBA is probably just your server's name, you are not referring to Samba (SMB) server as a service running on it. I bet it confused the heck out of everyone.

The DNS settings that are given to other computers on the network are controlled by

option domain-name-servers

line in your /etc/dhcpd.conf.

Now, there is no really easy way to update this configuration when your DHCP _client_ on your server gets the new address and DNS settings from comcast - I can give you this link http://www.netbsd.org/Documentation/network/dhcp.html#keep-resolv-conf as an idea, but you probably can solve this problem easier by installing your own DNS server on this machine (bind).
0
 
LVL 5

Expert Comment

by:ircpamanager
ID: 16539884
On the SAMBA box, go to a command line and type "testparm" and post the results.
If you do not have DNS(Bind, etc...) runnig I agree with m1tk4, you should install your own DNS. Only thing is if the comcast account is home, the IP is dynamic.(can cause problems if you have FQDN)Are you using Comcast DNS servers? If you are you cant update there DNS "A" records from your DHCP leases. Does that make any sense? Or did I misunderstand and you have the DNS server running on a local box?
Post back your results.
0
 

Author Comment

by:mspencer100
ID: 16540187
Okay, here is what I’ve found:
The box in question is a firewall/router
And is working with 5 subnets that can not see each other but use the same internet connection.
It also looks like the guy that managed this had it part of his office’s subnet via VPN (outsourced IT) (I think)
In the file dhcpcd-eth6.info it shows DNS addresses from AT&T not Comcast…
I would like to be able to change this back to a local DNS and remove and VPN settings to the other network. While keeping the 5 subnets intact.

But for now how do i change the current DNS to the new ones?

Big order for a linux newbie

See the files below.


[root@? root]# cd /etc
[root@? etc]# cat dhcpd.conf
ddns-update-style ad-hoc;
# default gateway
#option routers 192.168.0.1;
#option subnet-mask 255.255.255.0;

option domain-name-servers 10.0.0.1;

default-lease-time 21600;
max-lease-time 43200;

subnet 10.0.0.0 netmask 255.255.255.0 {
        option routers 10.0.0.1;
        range 10.0.0.50 10.0.0.100;
}

subnet 10.0.1.0 netmask 255.255.255.0 {
  option routers 10.0.1.1;
  option domain-name-servers 10.0.1.1;
        range 10.0.1.50 10.0.1.100;
}

subnet 10.0.2.0 netmask 255.255.255.0 {
  option routers 10.0.2.1;
  option domain-name-servers 10.0.2.1;
        range 10.0.2.50 10.0.2.100;
}

subnet 10.0.3.0 netmask 255.255.255.0 {
  option routers 10.0.3.1;
  option domain-name-servers 10.0.3.1;
        range 10.0.3.50 10.0.3.100;
}

subnet 10.0.4.0 netmask 255.255.255.0 {
  option routers 10.0.4.1;
  option domain-name-servers 10.0.4.1;
        range 10.0.4.50 10.0.4.100;
}
[root@? etc]# cd dhcpc
[root@? dhcpc]# ls
dhcpcd-eth0.cache  dhcpcd-eth0.info.old  dhcpcd-eth6.cache  dhcpcd-eth6.pid
dhcpcd-eth0.info   dhcpcd-eth0.pid       dhcpcd-eth6.info
[root@? dhcpc]# cat dhcpcd-eth6.info (In the note i was given eth6 is for DHCP)
IPADDR=24.21.XX.XXX
NETMASK=255.255.248.0
NETWORK=24.21.XX.XXX
BROADCAST=255.255.255.255
GATEWAY=24.21.80.1
DOMAIN=had1.or.comcast.net.
DNS=216.148.227.79,204.127.202.19 (These should be 68.87.69.146 and 68.87.85.98)
DHCPSID=68.87.69.13  (Not sure what this is???)
DHCPGIADDR=10.141.208.1  (Not sure what this is???)
DHCPSIADDR=0.0.0.0  (Not sure what this is???)
DHCPCHADDR=(Not sure what this is???)
DHCPSHADDR=(Not sure what this is???)
DHCPSNAME=
LEASETIME=345600
RENEWALTIME=172800
REBINDTIME=302400
INTERFACE=eth6
CLASSID="Linux 2.4.24 i686"



[root@? etc]# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Processing section "[pdf-generator]"
Loaded services file OK.
WARNING: You have some share names that are longer than 8 chars
These may give errors while browsing or may not be accessible
to some older clients
Press enter to see a dump of your service definitions

# Global parameters
[global]
        coding system =
        client code page = 850
        code page directory = /etc/samba/codepages
        workgroup = MDKGROUP
        netbios name =
        netbios aliases =
        netbios scope =
        server string = Samba Server %v
        interfaces =
        bind interfaces only = No
        security = USER
        encrypt passwords = Yes
        update encrypted = No
        allow trusted domains = Yes
        hosts equiv =
        min passwd length = 5
        map to guest = Never
        null passwords = No
        obey pam restrictions = No
        password server =
        smb passwd file = /etc/samba/smbpasswd
        root directory =
        pam password change = No
        passwd program = /usr/bin/passwd
        passwd chat = *new*password* %n\n *new*password* %n\n *changed*
        passwd chat debug = No
        username map =
        password level = 0
        username level = 0
        unix password sync = No
        restrict anonymous = No
        lanman auth = Yes
        use rhosts = No
        admin log = No
        log level = 0
        syslog = 1
        syslog only = No
        log file = /var/log/samba/log.%m
        max log size = 50
        timestamp logs = Yes
        debug hires timestamp = No
        debug pid = No
        debug uid = No
        protocol = NT1
        large readwrite = Yes
        max protocol = NT1
        min protocol = CORE
        read bmpx = No
        read raw = Yes
        write raw = Yes
        nt smb support = Yes
        nt pipe support = Yes
        nt status support = Yes
        announce version = 4.9
        announce as = NT
        max mux = 50
        max xmit = 16644
        name resolve order = lmhosts host wins bcast
        max ttl = 259200
        max wins ttl = 518400
        min wins ttl = 21600
        time server = No
        unix extensions = No
        change notify timeout = 60
        deadtime = 0
        getwd cache = Yes
        keepalive = 300
        lpq cache time = 10
        max smbd processes = 0
        max disk size = 0
        max open files = 10000
        name cache timeout = 660
        read size = 16384
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        stat cache size = 50
        use mmap = Yes
        total print jobs = 0
        load printers = Yes
        printcap name = lpstat
        disable spoolss = No
        enumports command =
        addprinter command =
        deleteprinter command =
        show add printer wizard = Yes
        os2 driver map =
        strip dot = No
        mangling method = hash
        character set =
        mangled stack = 50
        stat cache = Yes
        domain admin group =
        domain guest group =
        machine password timeout = 604800
        add user script =
        delete user script =
        logon script =
        logon path = \\%N\%U\profile
        logon drive =
        logon home = \\%N\%U
        domain logons = No
        os level = 20
        lm announce = Auto
        lm interval = 60
        preferred master = Auto
        local master = Yes
        domain master = Auto
        browse list = Yes
        enhanced browsing = Yes
        dns proxy = No
        wins proxy = No
        wins server =
        wins support = No
        wins hook =
        kernel oplocks = Yes
        lock spin count = 3
        lock spin time = 10
        oplock break wait time = 0
        add share command =
        change share command =
        delete share command =
        config file =
        preload =
        lock dir = /usr/var/locks
        pid directory = /usr/var/locks
        default service =
        message command =
        dfree command =
        valid chars =
        remote announce =
        remote browse sync =
        socket address = 0.0.0.0
        homedir map =
        time offset = 0
        NIS homedir = No
        source environment =
        panic action =
        hide local users = No
        winbind uid =
        winbind gid =
        template homedir = /home/%D/%U
        template shell = /bin/false
        winbind separator = \
        winbind cache time = 15
        winbind enum users = Yes
        winbind enum groups = Yes
        winbind use default domain = No
        comment =
        path =
        alternate permissions = No
        username =
        guest account = nobody
        invalid users =
        valid users =
        admin users =
        read list =
        write list =
        printer admin =
        force user =
        force group =
        read only = Yes
        create mask = 0744
        force create mode = 00
        security mask = 0777
        force security mode = 00
        directory mask = 0755
        force directory mode = 00
        directory security mask = 0777
        force directory security mode = 00
        force unknown acl user = 00
        inherit permissions = No
        inherit acls = No
        guest only = No
        guest ok = No
        only user = No
        hosts allow =
        hosts deny =
        status = Yes
        nt acl support = Yes
        profile acls = No
        block size = 1024
        max connections = 0
        min print space = 0
        strict allocate = No
        strict sync = No
        sync always = No
        write cache size = 0
        max print jobs = 1000
        printable = No
        postscript = No
        printing = cups
        print command = lpr -r -P%p %s
        lpq command = lpq -P%p
        lprm command = lprm -P%p %j
        lppause command =
        lpresume command =
        queuepause command =
        queueresume command =
        printer name =
        use client driver = No
        default devmode = No
        printer driver =
        printer driver file = /etc/samba/printers.def
        printer driver location =
        default case = lower
        case sensitive = No
        preserve case = Yes
        short preserve case = Yes
        mangle case = No
        mangling char = ~
        hide dot files = Yes
        hide unreadable = No
        delete veto files = No
        veto files =
        hide files =
        veto oplock files =
        map system = No
        map hidden = No
        map archive = Yes
        mangled names = Yes
        mangled map =
        browseable = Yes
        blocking locks = Yes
        csc policy = manual
        fake oplocks = No
        locking = Yes
        oplocks = Yes
        level2 oplocks = Yes
        oplock contention limit = 2
        posix locking = Yes
        strict locking = No
        share modes = Yes
        copy =
        include =
        exec =
        preexec close = No
        postexec =
        root preexec =
        root preexec close = No
        root postexec =
        available = Yes
        volume =
        fstype = NTFS
        set directory = No
        wide links = Yes
        follow symlinks = Yes
        dont descend =
        magic script =
        magic output =
        delete readonly = No
        dos filemode = No
        dos filetimes = No
        dos filetime resolution = No
        fake directory create times = No
        vfs object =
        vfs options =

[homes]
        comment = Home Directories
        read only = No
        browseable = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        create mask = 0700
        guest ok = Yes
        printable = Yes
        print command = lpr-cups -P %p -o raw %s -r   # using client side printer drivers.
        browseable = No

[print$]
        path = /var/lib/samba/printers
        write list = @adm root

[pdf-generator]
        comment = PDF Generator (only valid users)
        path = /var/tmp
        printable = Yes
        print command = /usr/share/samba/scripts/print-pdf %s ~%u \\\\\\\\%L\\\\%u %m %I &
[root@? etc]#
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 5

Expert Comment

by:ircpamanager
ID: 16540602
Ok, first things first.(I do not envy you!)Could you display the contents of your /etc/resolv.conf file? What distro are you using(Debian, Red Hat, Suse, etc..) next lets see if bind is installed(for RPM based distro use "rpm -qa | grep bind" DPKG based distros use "dpkg --list | grep bind" If it is not installed, install it.
"option domain-name-servers 10.0.0.1;" is this the internal IP address of the "SAMBA box" I am guessing there is 6 network cards on this box? We will need to configure bind to listen on that IP. You have your work cut out for you. post back the results and we will take it from there.
0
 
LVL 5

Accepted Solution

by:
ircpamanager earned 1500 total points
ID: 16540674
oh yeah DHCPSID=68.87.69.13 is most likely your comcast IP address(one way to check is goto ipchicken.com and see what your external ip is)
DHCP_SERVER_IP=DHCPSIADDR
ISP_ADDR=DHCPSID
EXTERNAL_IP=IPADDR
DHCP_ROUTER=DHCPGIADDR
 
0
 
LVL 19

Expert Comment

by:alextoft
ID: 16542054
Blimey, what a mess! Sorry, but that dhcpd.conf is a joke! Why on earth is it running so many subnets?! If you really must do that and you don't have any routing internally, use a 16bit mask (255.255.0.0) then they can all talk to each other.

My opinion? If all the box does is provide your internet gateway, flatten it and grab a copy of IPcop from http://www.ipcop.org/ which is simple to set up and administer, and from the sounds of it will do everything you need. The fact that the machine is called Samba (and has a rather overcomplicated smb.conf) suggests that it's being used (or has previously been used) as a file/print server, although you don't actually mention whether it is or isn't.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month18 days, 7 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question