[CentOS] Samba issue accessing shares by IP address

Tue Oct 12 15:22:39 UTC 2010
Alfred von Campe <alfred at von-campe.com>

We have a strange issue with Samba shares on our CentOS 5.5 systems in that we can access the shares by name, but not by IP address.  First a little background.  Recently, our domain controllers were upgraded and I had to tweak the smb.conf file by changing security from DOMAIN to ADS and adding a setting for realm.  My smb.conf file looks like this (names and IP addresses have been changed):

[global]
        workgroup = OUR_DOMAIN
        printing = cups
        printcap name = cups
        printcap cache time = 750
        cups options = raw
        map to guest = Bad User
        include = /etc/samba/dhcp.conf
        logon path = \\%L\profiles\.msprofile
        logon home = \\%L\%U\.9xprofile
        logon drive = P:
        usershare allow guests = Yes
        add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$
        domain logons = No
        domain master = No
        security = ADS
        encrypt passwords = Yes
        password server = server1 server2
        username map = /etc/samba/smbusers
        usershare max shares = 100
        passdb backend = smbpasswd
        wins support = No
        wins server = 1.2.3.4
        name resolve order = lmhosts host wins
        log file = /var/log/samba/log.%m
        realm = COMPANY.COM
[scratch]
        comment = Scratch area for builds
        inherit acls = Yes
        path = /scratch
        read only = No

I also had to rejoin the CentOS systems to the domain by running "net ads join -U xxxxx" on each system.  I can access the scratch share from any Windows PC in our domain without having to authenticate as long as I use the name of the CentOS system.  But if I try to use the IP address of a CentOS system I get the "The network path was not found" error message. We have some systems in a lab from which we need to access the share by IP address.  This worked before the recent changes, and I can't figure out which of these changes may have caused this.  Any ideas?

TIA for any help,
Alfred