Yet another Samba-related (or maybe hostname or NetBIOS-related) problem

Posted on 2003-03-19
Medium Priority
Last Modified: 2012-05-04
Bear in mind that I'm pretty new at this whole Linux deal.  Networking isn't my area of expertise.

Okay, info dump time:

I've got a small LAN of three PCs (and a network printer) hooked up to a gateway router (Netgear RT314).  The router also provides DHCP for the network.  Two of the PCs are Windows 98 (let's call their host names A and B, for brevity's sake); the third is running Red Hat 6.1 (we'll call it C).  I just added this machine to the network and installed RH6.1 so it can hold some data files commonly accessed by the LAN.  So, I figured, "Hey, I got a book that says Samba would be great for this.  Let's do it!"

First I set up Samba on C.  I set its access level to SHARE to match that of the Windows machines; I create a directory in which to place the shared files and create a "Share" for it in Samba.  I set up the access levels, etc., etc.

After all that, I tried to access it via Network Neighborhood, and it doesn't show up.  But, hey, no big deal, nothing in Linux ever works the first try, right?  So I comb through the help files, the unofficial HOWTO at samba.org, and a few experts-exchange questions for possibilities.

Following Samba's DIAGNOSIS file and the HOWTO, I determine that Samba is indeed running.  I can log into it in several ways from the local machine (C) itself using smbclient; I have no problem with nmblookup (again, on C).  I can even access the shared folders on my Windows boxes (A & B) from C with smbclient, which is nice, but not my original desire.  But I try using A to access the shared folders on C (Windows accessing Linux box) and it can't do it.  What's more, it can't even seem to see the machine.

From A, I can ping C by IP address within the network, but I can't ping it by host name.  Doing a "net view" only turns up the Windows machines A & B; C is completely absent.  I'm fairly sure the share is set up properly, as I can use smbclient on C to access the shared folders on C by NetBIOS name.  No, it appears that my problem may be with other parts of my network seeing the machine by NetBIOS name.

I checked my router's DHCP table, and, interestingly, the entry for C doesn't have the machine's host name--it's just blank!  Even my printer shows up with a host name.  Yet C can access the Internet and A & B with no problem.  I'm pretty sure the host name on C is configured properly; on boot, it shows up with "C login: ", and the command prompt is "[root@C /root]#  " upon logging in as root.  However, I noticed that httpd wasn't starting up properly either, reporting that it "cannot determine local host name."

So, what do I do to get this Samba working?  Am I missing an obscure parameter for smb.conf?  Is my host name not properly set up?  Is the fact that my network uses DHCP at all working against me?

Thanks, experts!

For reference, here are a couple of pertinent configuration files from C:

*** /etc/smb.conf ***
# Samba config file created using SWAT
# from (
# Date: 2003/03/19 14:57:26

# Global parameters
      workgroup = THEWORKGROUP
      netbios name = C
      server string = PII 300MHz on RedHat Linux 6.1
      security = SHARE
      log file = /var/log/samba/log.%m
      max log size = 50
      socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
      dns proxy = No
      hosts allow = 192.168.0.
      remote announce =

      comment = Home Directories
      read only = No
      browseable = No

      comment = All Printers
      path = /var/spool/samba
      print ok = Yes
      browseable = No

      comment = SHAREPUB
      path = /share/pub
      read only = No
      guest ok = Yes
      public = Yes
      force directory mode = 777
      delete readonly = yes
      create mode = 777
      wide links = no
      force create mode = 7777
      directory mode = 777


*** /etc/hosts ***      C       C       localhost.localdomain    localhost     Router  Router     A       A     B       B


Question by:blahpers
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 19

Accepted Solution

Gabriel Orozco earned 1000 total points
ID: 8171837
1.- in your /etc/hosts, delete the line:     C       C
    end add a line:   C       C

2.- remote announce =
    I think it's wrong. maybe this will be better:
    remote announce =

3.- try pinging from the other computers to to see if they can access via tcp/ip. maybe you have bloqued access to your machine ;)

4.- add in the [global] secction this:
        os level = 75
        preferred master = yes
        local master = yes

restart samba and try :)

Author Comment

ID: 8175157
Thanks, buddy!

The host name still doesn't show up on my gateway, but the Windows boxes can see it now, and that's all the matters as far as I'm concerned.
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 8175422
delete this line and restart:
  remote announce =


Featured Post

ATEN's HDBaseT Presentation at InfoComm 2017

Hear ATEN Product Manager YT Liang review HDBaseT technology, highlighting ATEN’s latest solutions as they relate to real-world applications during her presentation at the HDBaseT booth at InfoComm 2017.

Question has a verified solution.

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

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

800 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