lmhosts 中文man頁面
NAME
lmhosts - samba的NetBIOS主機(jī)列表文件
總覽
lmhosts是一個samba的NetBIOS名字到IP地址映射文件。
描述
此文件是samba套件的一部分。
lmhosts是一個samba的NetBIOS名字到IP地址映射文件。它與/etc/hosts文件的格式非常相似,除了主機(jī)名部分必須符合NetBIOS名字格式。
文件格式
這是一個在一行之內(nèi)包含NetBIOS名字的ASCII文件。每行有兩個字段用空格互相隔開。任何以#號開始的條目將被忽略。這個文件的每一行都包含了以下的信息:
- IP
- 地址 - 點分十進(jìn)制格式。
- NetBIOS
- 名字 - 名字格式***用十五個字符,后面可以跟以#號起頭的兩位十六進(jìn)制值用于指出 NetBIOS名字類型。
如果后跟的#被忽略,那么所給出的IP地址將返回所有與給出的名字相匹配的機(jī)器名,而不管查找的是何種NetBIOS名字類型。
下面有個例子:
#
# Sample Samba lmhosts file.
#
192.9.200.1 TESTPC
192.9.200.20 NTSERVER#20
192.9.200.21 SAMBASERVER
這里包含了三個IP地址到NetBIOS名字的映射。***和第三個將返回名字分別為"TESTPC"和 "SAMBASERVER"的任何查詢結(jié)果,而不管所需的是何種類型NetBIOS名字成份。
第二個映射將只返回當(dāng)被查詢的"NTSERVER"名字類型為"0x20"的值。任何其它的名字類型將不會被解釋。
lmhosts文件的默認(rèn)保存位置與smb.conf文件的目錄相同。
版本
此手冊頁是針對samba套件版本2.0的。
另見
smb.conf (5), smbclient (1), smbpasswd (8), samba (7).
#p#
NAME
lmhosts - The Samba NetBIOS hosts file
SYNOPSIS
lmhosts is the samba(7) NetBIOS name to IP address mapping file.
DESCRIPTION
This file is part of the samba(7) suite.
lmhosts is the Samba NetBIOS name to IP address mapping file. It is very similar to the /etc/hosts file format, except that the hostname component must correspond to the NetBIOS naming format.
FILE FORMAT
It is an ASCII file containing one line for NetBIOS name. The two fields on each line are separated from each other by white space. Any entry beginning with '#' is ignored. Each line in the lmhosts file contains the following information:
- *
- IP Address - in dotted decimal format.
- *
- NetBIOS Name - This name format is a maximum fifteen character host name, with an optional trailing '#' character followed by the NetBIOS name type as two hexadecimal digits.
If the trailing '#' is omitted then the given IP address will be returned for all names that match the given name, whatever the NetBIOS name type in the lookup.
An example follows:
# # Sample Samba lmhosts file. # 192.9.200.1 TESTPC 192.9.200.20 NTSERVER#20 192.9.200.21 SAMBASERVER .fi Contains three IP to NetBIOS name mappings. The first and third will be returned for any queries for the names "TESTPC" and "SAMBASERVER" respectively, whatever the type component of the NetBIOS name requested. The second mapping will be returned only when the "0x20" name type for a name "NTSERVER" is queried. Any other name type will not be resolved. The default location of the lmhosts file is in the same directory as the smb.conf(5) file.
FILES
lmhosts is loaded from the configuration directory. This is usually /etc/samba or /usr/local/samba/lib.
VERSION
This man page is correct for version 3.0 of the Samba suite.
SEE ALSO
smbclient(1), smb.conf(5), and smbpasswd(8)