LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   "hosts allow" in smb.conf expects only FQDN, not alias or netbios name!? (https://www.linuxquestions.org/questions/linux-networking-3/hosts-allow-in-smb-conf-expects-only-fqdn-not-alias-or-netbios-name-322400/)

Not now, John! 05-11-2005 10:52 AM

"hosts allow" in smb.conf expects only FQDN, not alias or netbios name!?
 
There is no way to specify allowed hosts in smb.conf as hostname alias
(from /etc/hosts file) or as netbios names (from lmhosts file). Is this
normal behavior? If so, what is lmhosts file used for?
Using configuration shown below, the only way to specify allowed hosts
in smb.conf is with host's FQDN.
I'm using Samba 3.0.4.
Thanks in advance for any help.

Example:
hosts allow = eclipse.lan # this is OK
hosts allow = eclipse # eclipse denied connection !?

This is my /etc/samba/smb.conf file:
Code:

[global]
  workgroup = BLWIRELESS
  netbios name = %h
  server string = Samba
  security = SHARE
  smb passwd file = /etc/samba/private/smbpasswd
  private dir = /etc/samba/private
  passdb backend = smbpasswd
  name resolve order = lmhosts host
  hostname lookups = yes
  guest account = ambra
  hosts allow = eclipse littlefoot marinko
  log level = 2
  log file = /var/log/sambalog.%m
  max log size = 256
  load printers = no
  domain master = no
[shared]
  comment = Shared Directory on %L
  path = /home/ambra/shared
  guest ok = yes

Here is my /etc/samba/lmhosts file:
Code:

10.51.1.56 LITTLEFOOT
10.51.1.67 MARINKO
10.51.1.132 ECLIPSE

And here is my /etc/hosts file:
Code:

127.0.0.1        localhost
10.51.1.132      eclipse.lan        eclipse
10.51.1.56  littlefoot.lan        littlefoot
10.51.1.67  marinko.lan          marinko


Blindsight 10-13-2006 05:17 AM

It may not be loading your lmhosts file correctly. Ensure that it is indeed looking in /etc/samba for the lmhosts file. From the lmhosts file manpage:

Quote:

The default location of the lmhosts file is in the same directory as the smb.conf file.
In the old days my reply would have just been "man 5 lmhosts". Guess I'm getting soft in my old age. This forum hasnt changed much.. there is still a lack of posters willing to answer >1 day old 0 reply threads.

EDIT: Holy hell, this message was from 2005.


All times are GMT -5. The time now is 12:36 PM.