From 6377bc53cea04277d2b574396e008d57970f4998 Mon Sep 17 00:00:00 2001 From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Fri, 13 Mar 2020 10:29:31 +0000 Subject: [PATCH] MFC r340031, r340032, r340048: Improve SMB documentation Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D24057 smbutil(1): Reference nsmb.conf(5) and mount_smbfs(8) Reviewed by: bcr Approved by: krion (mentor, implicit), mat (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D17809 mount_smbfs(8): Mention /etc/nsmb.conf, smbutil(1) and nsmb.conf(5) Reviewed by: bcr Approved by: krion (mentor, implicit), mat (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D17808 nsmb.conf(5): Document the order of configuration loading Based on the comments in /etc/nsmb.conf. Reviewed by: bcr Approved by: krion (mentor, implicit), mat (mentor, implicit) Differential Revision: https://reviews.freebsd.org/D17810 --- contrib/smbfs/mount_smbfs/mount_smbfs.8 | 12 +++++++++--- contrib/smbfs/smbutil/smbutil.1 | 5 ++++- share/man/man5/nsmb.conf.5 | 17 ++++++++++++++++- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/contrib/smbfs/mount_smbfs/mount_smbfs.8 b/contrib/smbfs/mount_smbfs/mount_smbfs.8 index 78f4a134170..4b4c205dc7d 100644 --- a/contrib/smbfs/mount_smbfs/mount_smbfs.8 +++ b/contrib/smbfs/mount_smbfs/mount_smbfs.8 @@ -136,12 +136,14 @@ are 137. Path to mount point. .El .Sh FILES -.Bl -tag -width ".Pa ~/.nsmbrc" -compact +.Bl -tag -width ".Pa /etc/nsmb.conf" -compact .It Pa ~/.nsmbrc -Keeps static parameters for connections and other information. +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 @@ -163,7 +165,11 @@ 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 -.Bl -dash +.Xr smbutil 1 , +.Xr nsmb.conf 5 +.Pp +Other resources: +.Bl -dash -compact .It Chapter dedicated to Samba configuration in the .Fx diff --git a/contrib/smbfs/smbutil/smbutil.1 b/contrib/smbfs/smbutil/smbutil.1 index eec61937c7d..237db89b6a7 100644 --- a/contrib/smbfs/smbutil/smbutil.1 +++ b/contrib/smbfs/smbutil/smbutil.1 @@ -1,5 +1,5 @@ .\" $Id: smbutil.1,v 1.5 2002/04/16 02:48:16 bp Exp $ -.Dd February 14, 2000 +.Dd November 1, 2018 .Dt SMBUTIL 1 .Os .Sh NAME @@ -127,6 +127,9 @@ See .Pa ./examples/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 diff --git a/share/man/man5/nsmb.conf.5 b/share/man/man5/nsmb.conf.5 index 64a27dba0ff..84674e45531 100644 --- a/share/man/man5/nsmb.conf.5 +++ b/share/man/man5/nsmb.conf.5 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 24, 2016 +.Dd November 2, 2018 .Dt NSMB.CONF 5 .Os .Sh NAME @@ -41,6 +41,21 @@ 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. -- 2.45.0