LMHOSTS(5)
π LMHOSTS π
okay so bestie, welcome to the Samba NetBIOS hosts file β manual section 5, file formats and conventions, the whole vibe. it's literally just a little text file that tells Samba "this NetBIOS name? yeah, that's this IP." no cap. π¦
β¨ SYNOPSIS β¨
lmhosts is the samba(7) NetBIOS name to IP address mapping file. that's it, that's the whole synopsis, she's simple and she knows it π
πΈ DESCRIPTION πΈ
so first things first β this file is part of the samba(7) suite. she's a team player, she's in the group chat, she belongs. π«Ά
lmhosts is the Samba NetBIOS name to IP address mapping file. and the way that it's very similar to the /etc/hosts file format?? iconic. literally siblings. BUT β and this is the plot twist β the hostname component has to correspond to the NetBIOS naming format. not just any old name, bestie. NetBIOS rules only. β
π FILE FORMAT π
It's an ASCII file, and it holds one line per NetBIOS name. The two fields on each line are separated from each other by white space. Any entry that begins with '#' is ignored β that's the comment vibe, she's just there for decoration, we love her. π
Every line in the lmhosts file has this info:
- IP Address β in dotted decimal format. yep, the
192.168.something.somethingsituation. - 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. (she's a people pleaser, she says yes to everyone π)
An example follows, and honestly? serve:
#
# Sample Samba lmhosts file.
#
192.9.200.1 TESTPC
192.9.200.20 NTSERVER#20
192.9.200.21 SAMBASERVER
okay so that contains three IP to NetBIOS name mappings, let me break it down:
- 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. universal donors, basically. π - 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. she's picky, she's exclusive, she has standards. π
The default location of the lmhosts file is in the same directory as the smb.conf(5) file. they're roommates. they share a directory. it's giving domestic bliss. π
π¦ FILES π¦
lmhosts is loaded from the configuration directory. This is usually /etc/samba or /usr/local/samba/lib.
π VERSION π
This man page is part of version 4.24.7 of the Samba suite. periodt.
π₯ SEE ALSO π₯
smbclient(1), smb.conf(5), and smbpasswd(8)
go read those too, bestie, they're all in the family π
π AUTHOR π
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. literal legends, no notes. π
and that's the whole page, babe β¨ this one's from the Samba suite, version 4.24.7, dated 09/09/2026 β mwah, go configure something cute πππ¦
π¦ where this page comes from
- fedora 44: samba-common 2:4.24.7-1.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms