1.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved. 2.\" Copyright 2017, Nexenta Systems, Inc. All Rights Reserved. 3.\" Copyright 2022, RackTop Systems, Inc. All Rights Reserved. 4.\" Copyright 2022 Jason King 5.\" The contents of this file are subject to the terms of the 6.\" Common Development and Distribution License (the "License"). 7.\" You may not use this file except in compliance with the License. 8.\" 9.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10.\" or http://www.opensolaris.org/os/licensing. 11.\" See the License for the specific language governing permissions 12.\" and limitations under the License. 13.\" 14.\" When distributing Covered Code, include this CDDL HEADER in each 15.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16.\" If applicable, add the following below this CDDL HEADER, with the 17.\" fields enclosed by brackets "[]" replaced with your own identifying 18.\" information: Portions Copyright [yyyy] [name of copyright owner] 19.\" 20.Dd October 27, 2022 21.Dt SMB 5 22.Os 23.Sh NAME 24.Nm smb 25.Nd configuration properties for illumos CIFS server 26.Sh DESCRIPTION 27Behavior of the illumos CIFS server is defined by property values that are 28stored in the Service Management Facility, 29.Xr smf 7 . 30.Pp 31An authorized user can use the 32.Xr sharectl 8 33command to set global values 34for these properties in SMF. 35.Pp 36The following list describes the properties: 37.Bl -tag -width x 38.It Sy ads_site 39.Pp 40Specifies the site configured in DNS to look up Active Directory information. 41Sites provide a mechanism to partition or delegate administration and policy 42management, which are typically used in large or complex domains. 43.Pp 44The value should not be set if you do not have a local Active Directory site. 45By default, no value is set. 46.It Sy autohome_map 47.Pp 48Specifies the full path for the SMD autohome map file, 49.Pa smbautohome . 50The default path is 51.Pa /etc . 52.It Sy bypass_traverse_checking 53.Pp 54When set, allows the SMB server to bypass ACL 55.Dq traverse 56checks. 57The default value is 58.Ql true , 59for Windows compatibility. 60If this parameter is 61.Ql false , 62ACL checks require that 63.Dq traverse 64.Pq directory execute 65is granted on every directory 66above the directory the SMB client tries to access. 67Windows shares are normally setup with the higher level 68directories not specifically granting such access. 69.It Sy disposition 70.Pp 71A value that controls whether to disconnect the share or proceed if the map 72command fails. 73The disposition property only has meaning when the map property 74has been set. 75Otherwise it will have no effect. 76.Bd -literal -offset 2n 77disposition = [ continue | terminate ] 78.Ed 79.Bl -tag -width terminate 80.It Sy continue 81Proceed with share connection if the map command fails. 82This is the default in the event that disposition is not specified. 83.It Sy terminate 84Disconnect the share if the map command fails. 85.El 86.It Sy ddns_enable 87.Pp 88Enables or disables dynamic DNS updates. 89A value of 90.Ql true 91enables dynamic updates, while a value of 92.Ql false 93disables dynamic updates. 94By default, the value is 95.Ql false . 96.It Sy encrypt 97.Pp 98Controls SMB3 Encryption. 99For requests on a particular share, the server's 100behavior is controlled by the stricter of this option and the per-share 101.Dq encrypt 102option. 103.Pp 104When set to 105.Ql disabled , 106the server will not ask clients to encrypt requests. 107When set to 108.Ql enabled , 109the server will ask clients to encrypt requests, 110but will not require that they do so. 111Any message that can be encrypted will be encrypted. 112When set to 113.Ql required , 114the server will deny access to or disconnect 115any client that does not support encryption or fails to encrypt requests 116that they should. 117.Pp 118In other words, the 119.Ql enabled 120behavior is that any message that 121.Em can 122be encrypted 123.Em should 124be encrypted, while the 125.Ql required 126behavior is that any message that 127.Em can 128be encrypted 129.Em must 130be encrypted. 131.It Sy encrypt_cipher 132.Pp 133Specifies a list of enabled SMB 3.1.1 encryption ciphers. 134This property is only used when encryption is 135.Ql enabled 136.Po 137see 138.Sy encrypt 139property 140.Pc 141and negotiated SMB dialect is 3.1.1 or higher 142.Po 143see 144.Sy max_protocol 145property 146.Pc . 147Otherwise it is ignored. 148.Pp 149When the property is set, a list of comma separated ciphers should be specified, 150or the value 151.Ql all 152should be used instead to enable all supported ciphers. 153By default, when the property is empty, it is equivalent to value 154.Ql all 155\(em all available ciphers will be enabled. 156.Pp 157The list of ciphers should contain these values: 158.Bl -tag -width "aes128-ccm" 159.It Sy aes128-ccm 160AES-128-CCM cipher is enabled. 161It is the only cipher used for SMB 3.0.2 dialect. 162.It Sy aes128-gcm 163AES-128-GCM cipher is enabled. 164Preferred. 165.It Sy all 166All ciphers are enabled. 167.El 168.It Sy ipv6_enable 169.Pp 170Enables IPv6 Internet protocol support within the CIFS Service. 171Valid values are 172.Ql true 173and 174.Ql false . 175The default value is 176.Ql false . 177.It Sy keep_alive 178.Pp 179Specifies the number of seconds before an idle SMB connection is dropped by the 180illumos CIFS server. 181If set to 182.Ql 0 , 183idle connections are not dropped. 184Valid values are 185.Ql 0 186and from 187.Ql 20 188seconds and above. 189The default value is 190.Ql 0 . 191.It Sy lmauth_level 192Specifies the LAN Manager (LM) authentication level. 193The LM compatibility level 194controls the type of user authentication to use in workgroup mode or domain 195mode. 196The default value is 3. 197.Pp 198The following describes the behavior at each level. 199.Bl -tag -width "1" 200.It Sy 2 201In Windows workgroup mode, the illumos CIFS server accepts LM, NTLM, LMv2, and 202NTLMv2 requests. 203In domain mode, the SMB redirector on the illumos CIFS server 204sends NTLM requests. 205.It Sy 3 206In Windows workgroup mode, the illumos CIFS server accepts LM, NTLM, LMv2, and 207NTLMv2 requests. 208In domain mode, the SMB redirector on the illumos CIFS server 209sends LMv2 and NTLMv2 requests. 210.It Sy 4 211In Windows workgroup mode, the illumos CIFS server accepts NTLM, LMv2, and 212NTLMv2 requests. 213In domain mode, the SMB redirector on the illumos CIFS server 214sends LMv2 and NTLMv2 requests. 215.It Sy 5 216In Windows workgroup mode, the illumos CIFS server accepts LMv2 and NTLMv2 217requests. 218In domain mode, the SMB redirector on the illumos CIFS server sends 219LMv2 and NTLMv2 requests. 220.El 221.It Sy map 222.Pp 223The value is a command to be executed when connecting to the share. 224The command 225can take the following arguments, which will be substituted when the command is 226exec'd as described below: 227.Bl -tag -width "xx" 228.It Sy % Ns Sy U 229Windows username. 230.It Sy % Ns Sy D 231Name of the domain or workgroup of 232.Sy % Ns Sy U . 233.It Sy %h 234The server hostname. 235.It Sy %M 236The client hostname, or 237.Dq "" 238if not available. 239.It Sy %L 240The server NetBIOS name. 241.It Sy %m 242The client NetBIOS name, or 243.Dq "" 244if not available. 245This option is only valid for NetBIOS connections (port 139). 246.It Sy % Ns Sy I 247The IP address of the client machine. 248.It Sy %i 249The local IP address to which the client is connected. 250.It Sy %S 251The name of the share. 252.It Sy % Ns Sy P 253The root directory of the share. 254.It Sy %u 255The UID of the Unix user. 256.El 257.It Sy max_protocol 258.Pp 259Specifies the maximum SMB protocol level that the SMB service 260should allow clients to negotiate. 261The default value is 262.Ql 3.11 . 263Valid settings include: 264.Ql 1 , 265.Ql 2.1 , 266.Ql 3.0 , 267.Ql 3.02 , 268.Ql 3.11 . 269.It Sy min_protocol 270.Pp 271Specifies the minimum SMB protocol level that the SMB service 272should allow clients to negotiate. 273The default value is 274.Ql 1 . 275Valid settings include: 276.Ql 1 , 277.Ql 2.1 , 278.Ql 3.0 . 279.It Sy max_workers 280.Pp 281Specifies the maximum number of worker threads that will be launched to process 282incoming CIFS requests. 283The SMB 284.Sy max_mpx 285value, which indicates to a 286client the maximum number of outstanding SMB requests that it may have pending 287on the server, is derived from the 288.Sy max_workers 289value. 290To ensure compatibility with older versions of Windows the lower 8-bits of 291.Sy max_mpx 292must not be zero. 293If the lower byte of 294.Sy max_workers 295is zero, 296.Ql 64 297is added to the value. 298Thus the minimum value is 299.Ql 64 300and the default value, which appears in 301.Xr sharectl 8 302as 303.Ql 1024 , 304is 305.Ql 1088 . 306.It Sy netbios_scope 307.Pp 308Specifies the NetBIOS scope identifier, which identifies logical NetBIOS 309networks that are on the same physical network. 310When you specify a NetBIOS 311scope identifier, the server filters the number of machines that are listed in 312the browser display to make it easier to find other hosts. 313The value is a text string that represents a domain name. 314By default, no value is set. 315.It Sy oplock_enable 316.Pp 317Controls whether 318.Dq oplocks 319may be granted by the SMB server. 320The term 321.Dq oplock 322is short for 323.Dq opportunistic lock , 324which is the legacy name for cache delegations in SMB. 325By default, oplocks are enabled. 326Note that if oplocks are disabled, file I/O performance may be severely reduced. 327.It Sy pdc 328.Pp 329Specifies the preferred IP address for the domain controller. 330This property is 331sometimes used when there are multiple domain controllers to indicate which one 332is preferred. 333If the specified domain controller responds, it is chosen even if 334the other domain controllers are also available. 335By default, no value is set. 336.It Sy restrict_anonymous 337.Pp 338Disables anonymous access to 339.Sy IPC$ , 340which requires that the client be authenticated to get access to MSRPC 341services through 342.Sy IPC$ . 343A value of 344.Ql true 345disables anonymous access to 346.Sy IPC$ , 347while a value of 348.Ql false 349enables anonymous access. 350.It Sy short_names 351.Pp 352Enables the use of 353.Dq short names 354by SMB clients. 355The default value is 356.Ql false 357because modern SMB clients do not need short names, and 358using short names has some performance cost while listing directories 359and opening or renaming files. 360.It Sy signing_enabled 361.Pp 362Enables SMB signing. 363When signing is enabled but not required it is possible 364for clients to connect regardless of whether or not the client supports SMB 365signing. 366If a packet has been signed, the signature will be verified. 367If a 368packet has not been signed it will be accepted without signature verification. 369Valid values are 370.Ql true 371and 372.Ql false . 373The default value is 374.Ql false . 375.It Sy signing_required 376.Pp 377When SMB signing is required, all packets must be signed or they will be 378rejected, and clients that do not support signing will be unable to connect to 379the server. 380The 381.Sy signing_required 382setting is only taken into account when 383.Sy signing_enabled 384is 385.Ql true . 386Valid values are 387.Ql true 388and 389.Ql false . 390The default value is 391.Ql false . 392.It Sy system_comment 393.Pp 394Specifies an optional description for the system, which is a text string. 395This 396property value might appear in various places, such as Network Neighborhood or 397Network Places on Windows clients. 398By default, no value is set. 399.It Sy traverse_mounts 400.Pp 401The 402.Sy traverse_mounts 403setting determines how the SMB server 404presents sub-mounts underneath an SMB share. 405When 406.Sy traverse_mounts 407is 408.Ql true 409(the default), sub-mounts are presented to SMB clients 410like any other subdirectory. 411When 412.Sy traverse_mounts 413is 414.Ql false , 415sub-mounts are not shown to SMB clients. 416.It Sy unmap 417.Pp 418The value is a command to be executed when disconnecting the share. 419The command can take the same substitutions listed on the 420.Sy map 421property. 422.It Sy wins_exclude 423.Pp 424Specifies a comma-separated list of network interfaces that should not be 425registered with WINS. 426NetBIOS host announcements are made on excluded interfaces. 427.It Sy wins_server_1 428.Pp 429Specifies the IP address of the primary WINS server. 430By default, no value is set. 431.It Sy wins_server_2 432.Pp 433Specifies the IP address of the secondary WINS server. 434By default, no value is set. 435.El 436.Sh INTERFACE STABILITY 437Uncommitted 438.Sh SEE ALSO 439.Xr attributes 7 , 440.Xr smf 7 , 441.Xr sharectl 8 , 442.Xr smbadm 8 , 443.Xr smbd 8 , 444.Xr smbstat 8 445