LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   samba server does not seem to answer when called with the server name. (http://www.linuxquestions.org/questions/linux-server-73/samba-server-does-not-seem-to-answer-when-called-with-the-server-name-877185/)

patufet99 04-26-2011 10:28 AM

samba server does not seem to answer when called with the server name.
 
Hello,

I have replaced a Samba server that was running under Debian 5. with a new server now under Debian 6. I have restored the old Samba config files that worked normally, in the new server and there is an odd behaviour that I do not understand:

On the server:

Code:

server:~$ ping server
64 bytes from server (127.0.1.1): icmp_req=1 ttl=64 time=0.024 ms

On a windows client

Code:

C:\Documents and Settings>ping server

Pinging server.fritz.box [192.168.1.100] with 32 bytes of data:

Reply from 192.168.1.100: bytes=32 time <1ms TTL=64

both work normally.


Code:

server:~$ smbclient -L 192.168.1.100 -U user
Enter user's password:
Domain=[WINDOWS] OS=[Unix] Server=[Samba 3.5.6]

        Sharename      Type      Comment
        ---------      ----      -------
        print$          Disk      Printer Drivers
        FTP            Disk      FTP Shared files
        temp            Disk
        user            Disk      Home Directories
Domain=[WINDOWS] OS=[Unix] Server=[Samba 3.5.6]

        Server              Comment
        ---------            -------
        SERVER              my server
        PC-DEMO

        Workgroup            Master
        ---------            -------
        WINDOWS              SERVER

When testing the smb server with the server's IP address it works ok.

Code:

server:~$ smbclient -L server -U user
Enter user's password:
session request to SERVER failed (Not listening for calling name)
session request to *SMBSERVER failed (Not listening for calling name)

When testing the smb server with the server's name "server" (on this case) it does not work.

Any hints?

Thank you for your help.

Regards

sibe 04-26-2011 11:09 AM

Hi,

can we see your smb.conf?

dbmits 04-26-2011 11:13 AM

Hi, is nmbd running or installed ?
I think it's needed exactly for this.

patufet99 04-26-2011 12:08 PM

Here is the /etc/smb.conf file

Code:

[global]
  log file = /var/log/samba/log.%m
  name resolve order = host lmhosts bcast wins
  smb ports = 139
  passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
  obey pam restrictions = yes
  username map = /etc/samba/user.map
  encrypt passwords = true
  passwd program = /usr/bin/passwd %u
  passdb backend = tdbsam
  hosts allow = 127.0.0.1, 192.168.1.0/24
  hosts deny = ALL
  dns proxy = no
  printing = cups
  server string = my server
  workgroup = WINDOWS
  printcap name = cups
  security = user
  syslog = 2
  panic action = /usr/share/samba/panic-action %d
  max log size = 1000

[homes]
  comment = Home Directories
  browseable = no
  read only = no
  create mask = 0770
  directory mask = 0770

[print$]
  comment = Printer Drivers
  path = /var/lib/samba/printers
  browseable = yes
  read only = yes
  guest ok = no

[FTP]
  comment = FTP Shared files
  path = /home/ftp/
  writeable = yes
  browseable = yes
  create mask = 0770
  directory mask = 0770
  case sensitive = no

[temp]
  path= /home/temp
  public=yes


nmbd is installed and running:

Code:

server:~# ps -e
...
12557 ?        00:00:00 nmbd
12561 ?        00:00:00 smbd
12567 ?        00:00:00 smbd
...

Thank you for your comments.

patufet99 04-26-2011 12:35 PM

nmbd seems to work as expected:

/var/log/samba/log.nmbd

Code:

...
[2011/04/26 18:22:14.621793,  0] nmbd/nmbd.c:71(terminate)
  Got SIGTERM: going down...
[2011/04/26 18:22:17,  0] nmbd/nmbd.c:857(main)
  nmbd version 3.5.6 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2010
[2011/04/26 18:22:40.676194,  0] nmbd/nmbd_become_lmb.c:395(become_local_master_stage2)
  *****

  Samba name server SERVER is now a local master browser for workgroup WINDOWS on subnet 192.168.1.100

  *****


sibe 04-26-2011 12:43 PM

Quote:

Originally Posted by patufet99 (Post 4336989)
hosts allow = 127.0.0.1, 192.168.1.0/24

That could be the culprit. Try change it this way :

Code:

hosts allow = 127. 192.168.1.
Port 137:udp, 138:udp, 139:tcp and 445:tcp will also need to be allowed through your firewall to enable Windows to connect to your Samba server.

patufet99 04-26-2011 01:48 PM

Hi sibe,

thanks for your reply. I changed the host allow as you suggested and it seems to work now!
The curious thing is that it worked before, but perhaps something changed from the old samba version?

Thanks again for your help.

Regards.

rhbegin 12-28-2012 09:58 AM

Quote:

Originally Posted by sibe (Post 4337033)
That could be the culprit. Try change it this way :

Code:

hosts allow = 127. 192.168.1.
Port 137:udp, 138:udp, 139:tcp and 445:tcp will also need to be allowed through your firewall to enable Windows to connect to your Samba server.

I ran into this problem as well, I know this is dated but it is relevant.


I added 127.0.0.1 to the allowed host, I was not able to browse to the samba server running on CentOS 6.3 x86_64 with samba-3.5.10-125.el6.x86_64 installed.

Why is it with the service smb start the nmb process is not included?

I had to chkconfig smb & nmb on, however I could not get it to take the server name without entering it in the 'netbios name' ?

Can someone please help explain this?

thanks


All times are GMT -5. The time now is 11:06 PM.