Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16
Originally Posted by anony_alien thanks Atreyu for the reply, 1) Yes, there are linux clients, most ubuntu and gentoo clients. Okay, on one of them, check out /etc/nsswitch.conf and resolv.conf ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353

    Quote Originally Posted by anony_alien View Post
    thanks Atreyu for the reply,

    1) Yes, there are linux clients, most ubuntu and gentoo clients.
    Okay, on one of them, check out /etc/nsswitch.conf and resolv.conf - are they the same?

    2) SElinux is set to enforcing on:
    yes i would definitely try to disable that, at least temporarily:
    Code:
    setenforce 0
    do that as root, of course.

  2. #12
    Just Joined!
    Join Date
    Jun 2007
    Posts
    20
    Hi Atreyu,

    Thanks a lot for the help with this issue,
    very much appreciating this.



    After disabling selinux by:

    Code:
    sentenforce 0
    now I can start samba

    Code:
     
    service smb start
    Code:
    service smb status
    smbd (pid 3875) is running...
    Good news with that, but still can't seem to get it resolve the hostname

    And yes, the resolv.conf is configured correctly
    with the following:

    Code:
    nameserver 192.168.1.254

    nsswitch is configured as folllows:

    Code:
    
    #
    # /etc/nsswitch.conf
    #
    # An example Name Service Switch config file. This file should be
    # sorted with the most-used services at the beginning.
    #
    # The entry '[NOTFOUND=return]' means that the search for an
    # entry should stop if the search in the previous entry turned
    # up nothing. Note that if the search failed due to some other reason
    # (like no NIS server responding) then the search continues with the
    # next entry.
    #
    # Valid entries include:
    #
    #       nisplus                 Use NIS+ (NIS version 3)
    #       nis                     Use NIS (NIS version 2), also called YP
    #       dns                     Use DNS (Domain Name Service)
    #       files                   Use the local files
    #       db                      Use the local database (.db) files
    #       compat                  Use NIS on compat mode
    #       hesiod                  Use Hesiod for user lookups
    #       [NOTFOUND=return]       Stop searching if not found so far
    #
    
    # To use db, put the "db" in front of "files" for entries you want to be
    # looked up first in the databases
    #
    # Example:
    #passwd:    db files nisplus nis
    #shadow:    db files nisplus nis
    #group:     db files nisplus nis
    
    passwd:     compat winbind
    shadow:     compat winbind
    group:      compat winbind
    
    #hosts:     db files nisplus nis dns
    hosts:      files dns winbind
    
    # Example - obey only what nisplus tells us...
    #services:   nisplus [NOTFOUND=return] files
    #networks:   nisplus [NOTFOUND=return] files
    #protocols:  nisplus [NOTFOUND=return] files
    #rpc:        nisplus [NOTFOUND=return] files
    #ethers:     nisplus [NOTFOUND=return] files
    #netmasks:   nisplus [NOTFOUND=return] files
    
    bootparams: nisplus [NOTFOUND=return] files
    
    ethers:     files
    netmasks:   files
    networks:   files dns
    protocols:  db files
    rpc:        db files
    services:   db files
    
    netgroup:   files
    
    publickey:  nisplus
    
    automount:  files
    aliases:    files nisplus


    I did also restarted nmb, smb, & winbind services,
    but no luck, also restarted the server, no luck on it.



    Cheers,


    Quote Originally Posted by atreyu View Post
    Okay, on one of them, check out /etc/nsswitch.conf and resolv.conf - are they the same?


    yes i would definitely try to disable that, at least temporarily:
    Code:
    setenforce 0
    do that as root, of course.

  3. #13
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Quote Originally Posted by anony_alien View Post
    After disabling selinux by:

    Code:
    sentenforce 0
    now I can start samba
    That's good. If you want to permanently, set SELINUX=disabled in this file:
    Code:
    /etc/selinux/config
    and reboot. Of course, you may want SELINUX enabled on your system, in which case, there is probably a simple selinux context command you can run to make samba happy. you could probably google. it.


    Good news with that, but still can't seem to get it resolve the hostname

    And yes, the resolv.conf is configured correctly
    with the following:

    Code:
    nameserver 192.168.1.254

    nsswitch is configured as folllows:

    [CODE]
    I think the only line of interest in that file is this line:
    Code:
    hosts:      files dns winbind
    which just means the system will attempt to look up names in /etc/hosts before using DNS, but it will still use DNS. so i think that file is fine.

    There are only two things I can think to check:

    1) Have individual records been added on the dnsmasq server for the clients that are working?

    2) Is it possible that the clients are responding by name to pings b/c they have samba running with NETBIOS configured?

  4. $spacer_open
    $spacer_close
  5. #14
    Just Joined!
    Join Date
    Jun 2007
    Posts
    20
    Thanks Atreyu for the reply,

    That is what is happening,

    I still can't get it resolved by our dns server,
    as if I do nslookup from my workstation,
    i don't see it.

    nsswitch.conf seems perferctly configured.

    As I thought the same about hosts output.


    records are not listed in the server

    the dns server should be able to resolve it and provide it to my workstation


    strange that does not work, as it's only the centos servers that are having this issue.

    Cheers,


    Quote Originally Posted by atreyu View Post
    That's good. If you want to permanently, set SELINUX=disabled in this file:
    Code:
    /etc/selinux/config
    and reboot. Of course, you may want SELINUX enabled on your system, in which case, there is probably a simple selinux context command you can run to make samba happy. you could probably google. it.



    I think the only line of interest in that file is this line:
    Code:
    hosts:      files dns winbind
    which just means the system will attempt to look up names in /etc/hosts before using DNS, but it will still use DNS. so i think that file is fine.

    There are only two things I can think to check:

    1) Have individual records been added on the dnsmasq server for the clients that are working?

    2) Is it possible that the clients are responding by name to pings b/c they have samba running with NETBIOS configured?

  6. #15
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Curiosity got the better of me...

    I set up dnsmasq on a Fedora 17 box. The F17 ip address is 192.168.1.6. In my /etc/hosts on the F17 dnsmasq server, I have an entry for another PC (a RHEL4.x box):
    Code:
    192.168.1.4 rhel-box
    This is the entire dnsmasq.conf configuration file (comments and blank lines removed):
    Code:
    port=53
    user=dnsmasq
    group=dnsmasq
    pid-file=/var/run/dnsmasq.pid
    log-facility=/var/log/dnsmasq.log
    log-queries
    listen-address=192.168.1.6
    bind-interfaces
    conf-dir=/etc/dnsmasq.d
    I make sure that ports 53 and 67 are open in the iptables firewall, then restart dnsmasq and iptables.

    From a third box (Ubuntu VM), I have this in /etc/resolv.conf
    Code:
    nameserver 192.168.1.6
    I can then resolve the RHEL box by name from the Ubuntu box:
    Code:
    [root@ubuntu]# nslookup rhel-box
    Server:         192.168.1.6
    Address:        192.168.1.6#53
    
    Name:   rhel-box
    Address: 192.168.1.4
    All this amounts to this: i think you need to double-check the dnsmasq.conf file on the DNS server, or the /etc/hosts file on the same.

  7. #16
    Just Joined!
    Join Date
    Jun 2007
    Posts
    20
    in the dnsmasq.conf,
    no client ips are set in my dnsmasq.conf of the dns server here. Different configuration

    The hosts is also just set as default; just the loopback.



    It's not the issue, the issue is with centos servers, can't seem to understand how to fix it yet.


    Cheers,


    Quote Originally Posted by atreyu View Post
    Curiosity got the better of me...

    I set up dnsmasq on a Fedora 17 box. The F17 ip address is 192.168.1.6. In my /etc/hosts on the F17 dnsmasq server, I have an entry for another PC (a RHEL4.x box):
    Code:
    192.168.1.4 rhel-box
    This is the entire dnsmasq.conf configuration file (comments and blank lines removed):
    Code:
    port=53
    user=dnsmasq
    group=dnsmasq
    pid-file=/var/run/dnsmasq.pid
    log-facility=/var/log/dnsmasq.log
    log-queries
    listen-address=192.168.1.6
    bind-interfaces
    conf-dir=/etc/dnsmasq.d
    I make sure that ports 53 and 67 are open in the iptables firewall, then restart dnsmasq and iptables.

    From a third box (Ubuntu VM), I have this in /etc/resolv.conf
    Code:
    nameserver 192.168.1.6
    I can then resolve the RHEL box by name from the Ubuntu box:
    Code:
    [root@ubuntu]# nslookup rhel-box
    Server:         192.168.1.6
    Address:        192.168.1.6#53
    
    Name:   rhel-box
    Address: 192.168.1.4
    All this amounts to this: i think you need to double-check the dnsmasq.conf file on the DNS server, or the /etc/hosts file on the same.

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •