]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man5/nsmb.conf.5
Add 'contrib/libdiff/' from commit '9eb461aa4b61ab47855b2cee9e5b626a76888b5e'
[FreeBSD/FreeBSD.git] / share / man / man5 / nsmb.conf.5
1 .\" Copyright (c) 2003
2 .\" Originally written by Sergey A. Osokin
3 .\" Rewritten by Tom Rhodes
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .Dd November 2, 2018
27 .Dt NSMB.CONF 5
28 .Os
29 .Sh NAME
30 .Nm nsmb.conf
31 .Nd configuration file for
32 .Tn SMB
33 requests
34 .Sh DESCRIPTION
35 The
36 .Nm
37 file contains information about the computers, users, and shares
38 or mount points for the
39 .Tn SMB
40 network protocol.
41 .Pp
42 The configuration files are loaded in the following order:
43 .Pp
44 .Bl -enum -offset indent -width "" -compact
45 .It
46 .Pa ~/.nsmbrc
47 .It
48 .Pa /etc/nsmb.conf
49 .El
50 .Pp
51 As a result,
52 .Pa /etc/nsmb.conf
53 settings
54 override those in
55 .Pa ~/.nsmbrc .
56 .Pp
57 The configuration hierarchy is made up of several sections,
58 each section containing a few or several lines of parameters
59 and their assigned values.
60 Each of these sections must begin with a section name enclosed within
61 square brackets, similar to:
62 .Pp
63 .D1 Bq Ar section_name
64 .Pp
65 The end of each section is marked by either the start of a new section,
66 or by the abrupt ending of the file, commonly referred to as the
67 .Tn EOF .
68 Each section may contain zero or more parameters such as:
69 .Pp
70 .D1 Bq Ar section_name
71 .D1 Ar key Ns = Ns Ar value
72 .Pp
73 where
74 .Ar key
75 represents a parameter name, and
76 .Ar value
77 would be the parameter's assigned value.
78 .Pp
79 The
80 .Tn SMB
81 library uses the following information for section names:
82 .Pp
83 .Bl -tag -width indent -compact
84 .It Ic A)
85 .Bq Li default
86 .It Ic B)
87 .Bq Ar SERVER
88 .It Ic C)
89 .Bq Ar SERVER : Ns Ar USER
90 .It Ic D)
91 .Op Ar SERVER : Ns Ar USER : Ns Ar SHARE
92 .El
93 .Pp
94 Possible keywords may include:
95 .Bl -column ".Va retry_count" ".Sy Section"
96 .It Sy "Keyword Section Comment"
97 .It Sy "        A B C D"
98 .It Va addr        Ta "- + - -" Ta "IP address of SMB server"
99 .It Va charsets    Ta "- + + +" Ta "local:remote charset pair"
100 .It Va nbns        Ta "+ + - -" Ta "address of NetBIOS name server (WINS)"
101 .It Va nbscope     Ta "+ + - -" Ta "NetBIOS scope"
102 .It Va nbtimeout   Ta "+ + - -" Ta "timeout for NetBIOS name servers"
103 .It Va password    Ta "- - + +" Ta "plain text or simple encrypted password used to access the given share"
104 .It Va retry_count Ta "+ + - -" Ta "number of retries before connection is marked as broken"
105 .It Va timeout     Ta "+ + - -" Ta "SMB request timeout"
106 .It Va workgroup   Ta "+ + + +" Ta "workgroup name"
107 .El
108 .Sh FILES
109 .Bl -tag -width ".Pa /etc/nsmb.conf"
110 .It Pa /etc/nsmb.conf
111 The default remote mount-point configuration file.
112 .It Pa ~/.nsmbrc
113 The user specific remote mount-point configuration file.
114 .El
115 .Sh EXAMPLES
116 What follows is a sample configuration file which may,
117 or may not match your environment:
118 .Bd -literal -offset indent
119 # Configuration file for example.com
120 [default]
121 workgroup=SALES
122 # The 'FSERVER' is an NT server.
123 [FSERVER]
124 charsets=koi8-r:cp866
125 addr=fserv.example.com
126 # User specific data for FSERVER
127 [FSERVER:MYUSER]
128 password=$$16144562c293a0314e6e1
129 .Ed
130 .Pp
131 All lines which begin with the
132 .Ql #
133 character are comments and will not be parsed.
134 The
135 .Dq Li default
136 section describes the default workgroup or domain, in this case
137 .Dq Li SALES .
138 The next section depicted here as
139 .Dq Li FSERVER ,
140 defines a server section and then assigns it a charset which is only
141 required when Cyrillic characters are not used.
142 The hostname value,
143 .Dq Li fserv.example.com ,
144 is also assigned in this section.
145 .Dq Li FSERVER:USER ,
146 defines the user settings and is useful for saving the password used
147 during a specific connection.
148 The password may be plaintext or obfuscated using simple encryption.
149 The simple encrypted password starts with the `$$1' symbols.
150 Warning: the encryption function is very weak and intended only to hide
151 clear text passwords.
152 If the use of simple encryption is desired, the following command may be
153 used on a password:
154 .Bd -literal -offset indent
155 smbutil crypt
156 .Ed
157 .Sh SEE ALSO
158 .Xr smbutil 1 ,
159 .Xr mount_smbfs 8
160 .Sh AUTHORS
161 This manual page was written by
162 .An -nosplit
163 .An Sergey Osokin Aq Mt osa@FreeBSD.org
164 and
165 .An Tom Rhodes Aq Mt trhodes@FreeBSD.org .