]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man5/nsmb.conf.5
Merge libc++ trunk r351319, and resolve conflicts.
[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 .\" $FreeBSD$
27 .\"
28 .Dd November 2, 2018
29 .Dt NSMB.CONF 5
30 .Os
31 .Sh NAME
32 .Nm nsmb.conf
33 .Nd configuration file for
34 .Tn SMB
35 requests
36 .Sh DESCRIPTION
37 The
38 .Nm
39 file contains information about the computers, users, and shares
40 or mount points for the
41 .Tn SMB
42 network protocol.
43 .Pp
44 The configuration files are loaded in the following order:
45 .Pp
46 .Bl -enum -offset indent -width "" -compact
47 .It
48 .Pa ~/.nsmbrc
49 .It
50 .Pa /etc/nsmb.conf
51 .El
52 .Pp
53 As a result,
54 .Pa /etc/nsmb.conf
55 settings
56 override those in
57 .Pa ~/.nsmbrc .
58 .Pp
59 The configuration hierarchy is made up of several sections,
60 each section containing a few or several lines of parameters
61 and their assigned values.
62 Each of these sections must begin with a section name enclosed within
63 square brackets, similar to:
64 .Pp
65 .D1 Bq Ar section_name
66 .Pp
67 The end of each section is marked by either the start of a new section,
68 or by the abrupt ending of the file, commonly referred to as the
69 .Tn EOF .
70 Each section may contain zero or more parameters such as:
71 .Pp
72 .D1 Bq Ar section_name
73 .D1 Ar key Ns = Ns Ar value
74 .Pp
75 where
76 .Ar key
77 represents a parameter name, and
78 .Ar value
79 would be the parameter's assigned value.
80 .Pp
81 The
82 .Tn SMB
83 library uses the following information for section names:
84 .Pp
85 .Bl -tag -width indent -compact
86 .It Ic A)
87 .Bq Li default
88 .It Ic B)
89 .Bq Ar SERVER
90 .It Ic C)
91 .Bq Ar SERVER : Ns Ar USER
92 .It Ic D)
93 .Op Ar SERVER : Ns Ar USER : Ns Ar SHARE
94 .El
95 .Pp
96 Possible keywords may include:
97 .Bl -column ".Va retry_count" ".Sy Section"
98 .It Sy "Keyword Section Comment"
99 .It Sy "        A B C D"
100 .It Va addr        Ta "- + - -" Ta "IP address of SMB server"
101 .It Va charsets    Ta "- + + +" Ta "local:remote charset pair"
102 .It Va nbns        Ta "+ + - -" Ta "address of NetBIOS name server (WINS)"
103 .It Va nbscope     Ta "+ + - -" Ta "NetBIOS scope"
104 .It Va nbtimeout   Ta "+ + - -" Ta "timeout for NetBIOS name servers"
105 .It Va password    Ta "- - + +" Ta "plain text or simple encrypted password used to access the given share"
106 .It Va retry_count Ta "+ + - -" Ta "number of retries before connection is marked as broken"
107 .It Va timeout     Ta "+ + - -" Ta "SMB request timeout"
108 .It Va workgroup   Ta "+ + + +" Ta "workgroup name"
109 .El
110 .Sh FILES
111 .Bl -tag -width ".Pa /etc/nsmb.conf"
112 .It Pa /etc/nsmb.conf
113 The default remote mount-point configuration file.
114 .It Pa ~/.nsmbrc
115 The user specific remote mount-point configuration file.
116 .El
117 .Sh EXAMPLES
118 What follows is a sample configuration file which may,
119 or may not match your environment:
120 .Bd -literal -offset indent
121 # Configuration file for example.com
122 [default]
123 workgroup=SALES
124 # The 'FSERVER' is an NT server.
125 [FSERVER]
126 charsets=koi8-r:cp866
127 addr=fserv.example.com
128 # User specific data for FSERVER
129 [FSERVER:MYUSER]
130 password=$$16144562c293a0314e6e1
131 .Ed
132 .Pp
133 All lines which begin with the
134 .Ql #
135 character are comments and will not be parsed.
136 The
137 .Dq Li default
138 section describes the default workgroup or domain, in this case
139 .Dq Li SALES .
140 The next section depicted here as
141 .Dq Li FSERVER ,
142 defines a server section and then assigns it a charset which is only
143 required when Cyrillic characters are not used.
144 The hostname value,
145 .Dq Li fserv.example.com ,
146 is also assigned in this section.
147 .Dq Li FSERVER:USER ,
148 defines the user settings and is useful for saving the password used
149 during a specific connection.
150 The password may be plaintext or obfuscated using simple encryption.
151 The simple encrypted password starts with the `$$1' symbols.
152 Warning: the encryption function is very weak and intended only to hide
153 clear text passwords.
154 If the use of simple encryption is desired, the following command may be
155 used on a password:
156 .Bd -literal -offset indent
157 smbutil crypt
158 .Ed
159 .Sh SEE ALSO
160 .Xr smbutil 1 ,
161 .Xr mount_smbfs 8
162 .Sh AUTHORS
163 This manual page was written by
164 .An -nosplit
165 .An Sergey Osokin Aq Mt osa@FreeBSD.org
166 and
167 .An Tom Rhodes Aq Mt trhodes@FreeBSD.org .