diff --git a/contrib/smbfs/mount_smbfs/mount_smbfs.8 b/contrib/smbfs/mount_smbfs/mount_smbfs.8 index 4b4c205dc7da..604b1b414243 100644 --- a/contrib/smbfs/mount_smbfs/mount_smbfs.8 +++ b/contrib/smbfs/mount_smbfs/mount_smbfs.8 @@ -1,205 +1,204 @@ .\" $Id: mount_smbfs.8,v 1.10 2002/04/16 02:47:41 bp Exp $ -.\" $FreeBSD$ .Dd November 1, 2018 .Dt MOUNT_SMBFS 8 .Os .Sh NAME .Nm mount_smbfs -.Nd "mount a shared resource from an SMB file server" +.Nd mount a server message block (SMB1/CIFS) file system .Sh SYNOPSIS .Nm .Op Fl E Ar cs1 Ns Cm \&: Ns Ar cs2 .Op Fl I Ar host .Op Fl L Ar locale .Op Fl M Ar crights Ns Cm \&: Ns Ar srights .Op Fl N .Op Fl O Ar cowner Ns Cm \&: Ns Ar cgroup Ns Cm \&/ Ns Ar sowner Ns Cm \&: Ns Ar sgroup .Op Fl R Ar retrycount .Op Fl T Ar timeout .Op Fl U Ar username .Op Fl W Ar workgroup .Op Fl c Ar case .Op Fl d Ar mode .Op Fl f Ar mode .Op Fl g Ar gid .Op Fl n Ar opt .Op Fl u Ar uid .Sm off .Cm \&// Ns Ar user Cm \&@ Ar server .Op Cm \&: Ar port1 Op Cm \&: Ar port2 .Cm \&/ Ar share .Sm on .Ar node .Sh DESCRIPTION The .Nm command mounts a share from a remote server using SMB/CIFS protocol. .Pp The options are as follows: .Bl -tag -width indent .It Fl E Ar cs1 Ns Cm \&: Ns Ar cs2 Specifies local .Pq Ar cs1 and server's .Pq Ar cs2 character sets. .It Fl I Ar host Do not use NetBIOS name resolver and connect directly to .Ar host , which can be either a valid DNS name or an IP address. .It Fl L Ar locale Use .Ar locale for lower/upper case conversion routines. Set the locale for case conversion. By default, .Nm tries to use an environment variable .Ev LC_* to determine it. .It Fl M Ar crights Ns Cm \&: Ns Ar srights Assign access rights to the newly created connection. .It Fl N Do not ask for a password. At run time, .Nm reads the .Pa ~/.nsmbrc file for additional configuration parameters and a password. If no password is found, .Nm prompts for it. .It Fl O Ar cowner Ns Cm \&: Ns Ar cgroup Ns Cm \&/ Ns Ar sowner Ns Cm \&: Ns Ar sgroup Assign owner/group attributes to the newly created connection. .It Fl R Ar retrycount How many retries should be done before the SMB requester decides to drop the connection. Default is 4. .It Fl T Ar timeout Timeout in seconds for each request. Default is 15. .It Fl U Ar username Username to authenticate with. .It Fl W Ar workgroup This option specifies the workgroup to be used in the authentication request. .It Fl c Ar case Set a .Ar case option which affects name representation. .Ar case can be one of the following: .Bl -tag -width ".Em Value" .It Em Value .Em Meaning .It Cm l All existing file names are converted to lower case. Newly created file gets a lower case. .It Cm u All existing file names are converted to upper case. Newly created file gets an upper case. .El .It Fl f Ar mode , Fl d Ar mode Specify permissions that should be assigned to files and directories. The values must be specified as octal numbers. Default value for the file mode is taken from mount point, default value for the directory mode adds execute permission where the file mode gives read permission. .Pp Note that these permissions can differ from the rights granted by SMB server. .It Fl u Ar uid , Fl g Ar gid User ID and group ID assigned to files. The default are owner and group IDs from the directory where the volume is mounted. .It Cm \&// Ns Ar user Ns Cm \&@ Ns Ar server Ns Oo Cm \&: Ns Ar port1 Ns Oo Cm \&: Ns Ar port2 Oc Oc Ns Cm \&/ Ns Ar share The .Nm command will use .Ar server as the NetBIOS name of remote computer, .Ar user as the remote user name and .Ar share as the resource name on a remote server. Optional .Ar port1 and .Ar port2 arguments can be used to override default values of port numbers used by communication protocols. For SMB over NetBIOS default value for .Ar port1 are 139, and .Ar port2 are 137. .It Ar node Path to mount point. .El .Sh FILES .Bl -tag -width ".Pa /etc/nsmb.conf" -compact .It Pa ~/.nsmbrc Keeps user-specific static parameters for connections and other information. See .Pa /usr/share/examples/smbfs/dot.nsmbrc for details. .It Pa /etc/nsmb.conf Keeps system-wide static parameters for connections and other information. .El .Sh EXAMPLES The following example illustrates how to connect to SMB server .Dq SAMBA as user .Dq GUEST , and mount shares .Dq PUBLIC and .Dq TMP : .Bd -literal -offset indent mount_smbfs -I samba.mydomain.com //guest@samba/public /smb/public mount_smbfs -I 192.168.20.3 -E koi8-r:cp866 //guest@samba/tmp /smb/tmp .Ed .Pp It is also possible to use .Xr fstab 5 for smbfs mounts (the example below does not prompt for a password): .Pp .Dl "//guest@samba/public /smb/public smbfs rw,noauto,-N 0 0" .Sh SEE ALSO .Xr smbutil 1 , .Xr nsmb.conf 5 .Pp Other resources: .Bl -dash -compact .It Chapter dedicated to Samba configuration in the .Fx Handbook: .Lk "https://www.freebsd.org/doc/handbook/network-samba.html" .El .Sh STANDARDS .Nm offers support for SMB/CIFS/SMB1. It does not support newer versions of the protocol like SMB2 and SMB3. SMB2 and SMB3 are supported by software available in the .Xr ports 7 collection. .Pp The list of supported SMB servers includes: .Bl -dash -compact .It Samba .It Windows 95/98/ME/2000/NT4.0 (SPs 4, 5, 6) .It IBM LanManager .It NetApp .El .Sh HISTORY SMB/CIFS protocol and SMB/CIFS file system implementation first appeared in .Fx 4.5 . .Sh AUTHORS .An Boris Popov Aq bp@butya.kz , .Aq bp@FreeBSD.org .Sh BUGS Please report bugs to the author. diff --git a/contrib/smbfs/smbutil/smbutil.1 b/contrib/smbfs/smbutil/smbutil.1 index cf133bad309a..c82ba91ea99e 100644 --- a/contrib/smbfs/smbutil/smbutil.1 +++ b/contrib/smbfs/smbutil/smbutil.1 @@ -1,137 +1,137 @@ .\" $Id: smbutil.1,v 1.5 2002/04/16 02:48:16 bp Exp $ .Dd November 14, 2018 .Dt SMBUTIL 1 .Os .Sh NAME .Nm smbutil -.Nd "interface to the SMB requester" +.Nd interface to the server message block (SMB1/CIFS) requester .Sh SYNOPSIS .Nm .Op Fl hv .Ar command .Op Ar options .Op Ar args .Sh DESCRIPTION The .Nm command is used to control SMB requester and issue various commands. .Pp There are two types of options \(em global and local to the specified .Ar command . .Pp Global options are as follows: .Bl -tag -width indent .It Fl h Print a short help message. .It Fl v Verbose output. .El .Pp The commands and local options are: .Bl -tag -width indent .It Cm crypt Op Ar password Encrypt clear text password for use in the .Pa ~/.nsmbrc file. The encrypted password starts with the .Ql $$1 symbols. Warning: the encryption function is very weak and intended only to hide clear text password. If .Ar password is omitted from the command line, .Nm will prompt for one. .It Cm help Ar command Print usage information about .Ar command . .It Cm lc List active connections and their parameters. .It Xo .Cm login .Op Ar connection_options .Cm \&// Ns Ar user Ns Cm \&@ Ns Ar server Ns Op Cm \&/ Ns Ar share .Xc Login/attach to the specified .Ar server and/or .Ar share as .Ar user . This command will create and authenticate connection to an SMB server, and will leave it active after exit. Thus, it is possible to login only once and then use other SMB commands without authentication procedure and additional connections. For the description of .Ar connection_options refer to the .Xr mount_smbfs 8 manual page (all uppercase options are connection options). .It Xo .Cm logout .Cm \&// Ns Ar user Ns Cm \&@ Ns Ar server Ns Op Cm \&/ Ns Ar share .Xc Logout/detach from the specified .Ar server and/or .Ar share as .Ar user . This command will destroy a connection created by the .Cm login command. A connection may not be closed immediately if it is used by other programs. .It Xo .Cm lookup .Op Fl w Ar host .Ar name .Xc Resolve the given .Ar name to an IP address. The NetBIOS name server can be directly specified via the .Fl w option. .It Xo .Cm print .Op Ar connection_options .Cm \&// Ns Ar user Ns Cm \&@ Ns Ar server Ns Op Cm \&/ Ns Ar share .Ar file .Xc Send the given .Ar file to the specified queue on the remote server. If .Ar file is .Dq Pa - , then standard input will be used. .It Xo .Cm view .Op Ar connection_options .Cm \&// Ns Ar user Ns Cm \&@ Ns Ar server .Xc List resources available on the specified .Ar server for the user .Ar user . .El .Sh FILES .Bl -tag -width ".Pa ~/.nsmbrc" -compact .It Pa ~/.nsmbrc Keeps description for each connection. See .Pa /usr/share/examples/smbfs/dot.nsmbrc for details. .El .Sh SEE ALSO .Xr nsmb.conf 5 , .Xr mount_smbfs 8 .Sh AUTHORS .An Boris Popov Aq bp@butya.kz , .Aq bp@FreeBSD.org .Sh BUGS Please report any bugs to the author. diff --git a/share/man/man5/nsmb.conf.5 b/share/man/man5/nsmb.conf.5 index 1a09743874e5..0da10343ed77 100644 --- a/share/man/man5/nsmb.conf.5 +++ b/share/man/man5/nsmb.conf.5 @@ -1,165 +1,166 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2003 .\" Originally written by Sergey A. Osokin .\" Rewritten by Tom Rhodes .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .Dd November 2, 2018 .Dt NSMB.CONF 5 .Os .Sh NAME .Nm nsmb.conf -.Nd configuration file for -.Tn SMB -requests +.Nd configuration file for server message block (SMB1/CIFS) requests .Sh DESCRIPTION The .Nm file contains information about the computers, users, and shares or mount points for the .Tn SMB network protocol. .Pp The configuration files are loaded in the following order: .Pp .Bl -enum -offset indent -width "" -compact .It .Pa ~/.nsmbrc .It .Pa /etc/nsmb.conf .El .Pp As a result, .Pa /etc/nsmb.conf settings override those in .Pa ~/.nsmbrc . .Pp The configuration hierarchy is made up of several sections, each section containing a few or several lines of parameters and their assigned values. Each of these sections must begin with a section name enclosed within square brackets, similar to: .Pp .D1 Bq Ar section_name .Pp The end of each section is marked by either the start of a new section, or by the abrupt ending of the file, commonly referred to as the .Tn EOF . Each section may contain zero or more parameters such as: .Pp .D1 Bq Ar section_name .D1 Ar key Ns = Ns Ar value .Pp where .Ar key represents a parameter name, and .Ar value would be the parameter's assigned value. .Pp The .Tn SMB library uses the following information for section names: .Pp .Bl -tag -width indent -compact .It Ic A) .Bq Li default .It Ic B) .Bq Ar SERVER .It Ic C) .Bq Ar SERVER : Ns Ar USER .It Ic D) .Op Ar SERVER : Ns Ar USER : Ns Ar SHARE .El .Pp Possible keywords may include: .Bl -column ".Va retry_count" ".Sy Section" .It Sy "Keyword Section Comment" .It Sy " A B C D" .It Va addr Ta "- + - -" Ta "IP address of SMB server" .It Va charsets Ta "- + + +" Ta "local:remote charset pair" .It Va nbns Ta "+ + - -" Ta "address of NetBIOS name server (WINS)" .It Va nbscope Ta "+ + - -" Ta "NetBIOS scope" .It Va nbtimeout Ta "+ + - -" Ta "timeout for NetBIOS name servers" .It Va password Ta "- - + +" Ta "plain text or simple encrypted password used to access the given share" .It Va retry_count Ta "+ + - -" Ta "number of retries before connection is marked as broken" .It Va timeout Ta "+ + - -" Ta "SMB request timeout" .It Va workgroup Ta "+ + + +" Ta "workgroup name" .El .Sh FILES .Bl -tag -width ".Pa /etc/nsmb.conf" .It Pa /etc/nsmb.conf The default remote mount-point configuration file. .It Pa ~/.nsmbrc The user specific remote mount-point configuration file. .El .Sh EXAMPLES What follows is a sample configuration file which may, or may not match your environment: .Bd -literal -offset indent # 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 .Ed .Pp All lines which begin with the .Ql # character are comments and will not be parsed. The .Dq Li default section describes the default workgroup or domain, in this case .Dq Li SALES . The next section depicted here as .Dq Li FSERVER , defines a server section and then assigns it a charset which is only required when Cyrillic characters are not used. The hostname value, .Dq Li fserv.example.com , is also assigned in this section. .Dq Li 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. If the use of simple encryption is desired, the following command may be used on a password: .Bd -literal -offset indent smbutil crypt .Ed .Sh SEE ALSO .Xr smbutil 1 , .Xr mount_smbfs 8 .Sh AUTHORS This manual page was written by .An -nosplit .An Sergey Osokin Aq Mt osa@FreeBSD.org and .An Tom Rhodes Aq Mt trhodes@FreeBSD.org .