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