NSMBRC(5) | File Formats and Configurations | NSMBRC(5) |
nsmbrc - configuration file for Solaris CIFS client requests
$HOME/.nsmbrc
Global behavior of the Solaris CIFS client is defined by property values that are stored in the Service Management Facility (SMF). The .nsmbrc file can be used to customize the behavior of the Solaris CIFS client on a per-user basis. Settings in the $HOME/.nsmbrc file are used unless they have security implications.
An authorized user can use the sharectl command to set global values for these properties in SMF. See sharectl(8).
A regular user can change the global values when granted the "SMBFS Management" rights profile in the /etc/user_attr file. See user_attr(5) and rbac(7).
The SMBFS library first reads from SMF and then the $HOME/.nsmbrc file when determining which policy to apply to a particular server, user, or share. $HOME/.nsmbrc entries take precedence with the exception of the minauth property value. For minauth, the strongest authentication level specified is used. Sections are applied so that more specific sections override less specific sections. Not all keywords are valid in all sections.
The configuration file is comprised of these four section types. Each section can include zero or more properties and associated values. The sections also have a hierarchical relationship with each other, as shown by the order of the following list:
The section name appears in the .nsmbrc file as [default].
The section name appears in the .nsmbrc file as [server-name]. server-name must use uppercase characters to match.
The section name appears in the .nsmbrc as [server-name:username]. Both server-name and username must use uppercase characters to match.
The section name appears in the .nsmbrc as [server-name:username:share-name]. Both server-name and username must use uppercase characters to match.
The end of each section is marked either by the start of a new section or by an end of file (EOF).
The following list describes the properties and states in which sections they can be set:
addr
domain
minauth
min_protocol
max_protocol
nbns
nbns_broadcast
nbns_enable
password
If you assign the hashed password from the smbutil crypt command to the password property, be sure to escape the special characters in the password.
signing
When set to disabled, the client permits the use of SMB security signatures only if the server requires signing. In such an instance, the Solaris CIFS client ignores local property values.
When set to enabled, the client permits, but does not require, the use of SMB security signatures.
When set to required, the client requires the use of SMB security signatures. So, if SMB security signatures are disabled on a CIFS server and a client has signing required, the client cannot connect to that server.
timeout
user
workgroup
The examples in this section show how to use the .nsmbrc file and the smbutil command to configure the example.com environment.
The example.com environment is described by means of these sections and settings:
Example 1 Using the $HOME/.nsmbrc Configuration File
The following example shows how a user can configure the example.com environment by creating the .nsmbrc file.
All lines that begin with the # character are comments and are not parsed.
# Configuration file for example.com # Specify the Windows account name to use everywhere. [default] domain=MYDOMAIN user=MYUSER # The 'FSERVER' is server in our domain. [FSERVER] addr=fserv.example.com # The 'RSERVER' is a server in another domain. [RSERVER] domain=REMGROUP addr=rserv.example.com
Example 2 Using the sharectl Command
The following example shows how an authorized user can use sharectl commands to configure global settings for the example.com environment in SMF.
# sharectl set -p section=default -p domain=MYDOMAIN \ -p user=MYUSER smbfs # sharectl set -p section=FSERVER -p addr=fserv.example.com smbfs # sharectl set -p section=RSERVER -p domain=REMGROUP \ -p addr=rserv.example.com smbfs
Example 3 Using the sharectl Command to Show Current Settings
The following example shows how an authorized user can use the sharectl get command to view the global settings for smbfs in SMF. The values shown are those set by the previous example.
# sharectl get smbfs [default]
domain=MYDOMAIN
user=MYUSER [FSERVER]
addr=fserv.example.com [RSERVER]
domain=REMGROUP
addr=rserv.example.com
$HOME/.nsmbrc
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Committed |
smbutil(1), smbfs(4FS), nsswitch.conf(5), user_attr(5), attributes(7), rbac(7), mount_smbfs(8), sharectl(8)
By default, passwords stored in the .nsmbrc file are ignored unless only the file owner has read and write permission.
November 22, 2021 | OmniOS |