NSMB.CONF(5)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… NSMB.CONF(5) β€” nsmb.conf

okay so bestie, welcome to nsmb.conf(5), straight out of the File Formats Manual ✨ this is the whole lore on nsmb.conf, aka the configuration file for server message block (SMB1/CIFS) requests 🫢


🌸 NAME

nsmb.conf β€” configuration file for server message block (SMB1/CIFS) requests


✨ DESCRIPTION

The nsmb.conf file is literally the gossip file πŸ’… it holds all the info about the computers, users, and shares or mount points for the SMB network protocol.

The configuration files load in this order, no cap:

  1. ~/.nsmbrc
  2. /etc/nsmb.conf

So because of that ordering, /etc/nsmb.conf settings override the ones in ~/.nsmbrc. the system file said "i'm the main character" and honestly? valid πŸ‘‘

The configuration hierarchy is made up of several sections, and each section has a few or several lines of parameters plus their assigned values. Every section has to begin with a section name wrapped in square brackets, like this:

[section_name]

The end of a section is marked by either the start of a new section, or by the abrupt ending of the file β€” the thing we all call the EOF 😭. Each section may contain zero or more parameters, like:

[section_name]
key=value

where key is a parameter name and value is that parameter's assigned value. simple as πŸŽ€

The SMB library uses the following info for section names:

A) [default] B) [SERVER] C) [SERVER:USER] D) [SERVER:USER:SHARE]

Possible keywords may include β€” and yes the little + / - grid matters, + means the keyword works in that section and - means it does not πŸ™ˆ:

  • addr β€” sections: B only (- + - -). IP address of SMB server
  • charsets β€” sections: B C D (- + + +). local:remote charset pair
  • nbns β€” sections: A B (+ + - -). address of NetBIOS name server (WINS)
  • nbscope β€” sections: A B (+ + - -). NetBIOS scope
  • nbtimeout β€” sections: A B (+ + - -). timeout for NetBIOS name servers
  • password β€” sections: C D (- - + +). plain text or simple encrypted password used to access the given share
  • retry_count β€” sections: A B (+ + - -). number of retries before connection is marked as broken
  • timeout β€” sections: A B (+ + - -). SMB request timeout
  • workgroup β€” sections: A B C D (+ + + +). workgroup name

πŸŽ€ FILES

  • /etc/nsmb.conf β€” The default remote mount-point configuration file.
  • ~/.nsmbrc β€” The user specific remote mount-point configuration file.

πŸ¦‹ EXAMPLES

What follows is a sample configuration file which may, or may not, match your environment (no promises bestie 🫢):

# Configuration file for example.com
[default]
workgroup=SALES
# The 'FSERVER' is an NT server.
[FSERVER]
charsets=koi8-r:cp866
addr=fserv.example.com
# User specific data for FSERVER
[FSERVER:MYUSER]
password=$$16144562c293a0314e6e1

All lines which begin with the # character are comments and will not be parsed πŸ’– The default section describes the default workgroup or domain, in this case SALES. The next section depicted here as FSERVER, defines a server section and then assigns it a charset which is only required when Cyrillic characters are not used. The hostname value, fserv.example.com, is also assigned in this section. FSERVER:USER, defines the user settings and is useful for saving the password used during a specific connection. The password may be plaintext or obfuscated using simple encryption. The simple encrypted password starts with the `$$1' symbols.

⚠️ Warning: the encryption function is very weak and intended only to hide clear text passwords. like it's giving "privacy theater" ngl πŸ’€ don't trust it with anything real, fr fr.

If the use of simple encryption is desired, the following command may be used on a password:

smbutil crypt

πŸ”₯ SEE ALSO

smbutil(1), mount_smbfs(8)


πŸ‘‘ AUTHORS

This manual page was written by Sergey Osokin <osa@FreeBSD.org> and Tom Rhodes <trhodes@FreeBSD.org>.


and that's the whole page bestie, you ate that πŸ’… ok one last lil sign-off: this one's from Debian, dated November 2, 2018, filed under NSMB.CONF(5) β€” periodt 🌈⭐

πŸ“¦ where this page comes from