Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-11-2005, 10:52 AM   #1
Not now, John!
Registered: Jul 2004
Distribution: LFS 5.1
Posts: 161

Rep: Reputation: 30
"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.

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

This is my /etc/samba/smb.conf file:
  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
  comment = Shared Directory on %L
  path = /home/ambra/shared
  guest ok = yes
Here is my /etc/samba/lmhosts file:
And here is my /etc/hosts file:
Code:        localhost      eclipse.lan        eclipse   littlefoot.lan        littlefoot   marinko.lan           marinko

Last edited by Not now, John!; 10-13-2006 at 05:28 AM.
Old 10-13-2006, 05:17 AM   #2
Registered: Mar 2003
Distribution: Slackware
Posts: 234

Rep: Reputation: 30
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:

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.

Last edited by Blindsight; 10-13-2006 at 05:19 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What does echo alias "char-major-10-224 off" >> /etc/modules.conf do? abefroman Linux - Software 2 09-16-2009 10:10 PM
bash equivalence of tcsh "alias em "emacs \!:1 &""? rgiggs Slackware 3 07-29-2004 02:07 AM
Couldn't display "SMB:///" , No host "(Null)" could been Found?????? munkey Linux - Newbie 3 05-03-2004 04:30 PM
Couldn't display "SMB:///" , No host "(Null)" could been Found?????? help munkey Fedora 6 04-30-2004 06:04 PM
"X-MS" cant open because "x-Multimedia System" cant access files at "smb&qu ponchy5 Linux - Networking 0 03-29-2004 11:18 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:43 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration