Skip to content

Commit d7b42b9

Browse files
Merge pull request #108108 from lanicolas/patch-48
Align with bash style guide
2 parents b9221d3 + ede003f commit d7b42b9

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

articles/storage/files/files-smb-protocol.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -107,44 +107,44 @@ Update-AzStorageFileServiceProperty `
107107
To get the status of SMB Multichannel, use the `az storage account file-service-properties show` command. Remember to replace `<resource-group>` and `<storage-account>` with the appropriate values for your environment before running these Bash commands.
108108

109109
```bash
110-
resourceGroupName="<resource-group>"
111-
storageAccountName="<storage-account>"
110+
RESOURCE_GROUP_NAME="<resource-group>"
111+
STORAGE_ACCOUNT_NAME="<storage-account>"
112112

113113
# If you've never enabled or disabled SMB Multichannel, the value for the SMB Multichannel
114114
# property returned by Azure Files will be null. Null returned values should be interpreted
115115
# as "default settings are in effect". To make this more user-friendly, the following
116116
# PowerShell commands replace null values with the human-readable default values.
117117

118118
## Search strings
119-
replaceSmbMultichannel="\"smbMultichannelEnabled\": null"
119+
REPLACESMBMULTICHANNEL="\"smbMultichannelEnabled\": null"
120120

121121
# Replacement values for null parameters.
122-
defaultSmbMultichannelEnabled="\"smbMultichannelEnabled\": false"
122+
DEFAULTSMBMULTICHANNELENABLED="\"smbMultichannelEnabled\": false"
123123

124124
# Build JMESPath query string
125-
query="{"
126-
query="${query}smbMultichannelEnabled: protocolSettings.smb.multichannel.enabled"
127-
query="${query}}"
125+
QUERY="{"
126+
QUERY="${QUERY}smbMultichannelEnabled: protocolSettings.smb.multichannel.enabled"
127+
QUERY="${QUERY}}"
128128

129129
# Get protocol settings from the Azure Files FileService object
130130
protocolSettings=$(az storage account file-service-properties show \
131-
--resource-group $resourceGroupName \
132-
--account-name $storageAccountName \
133-
--query "${query}")
131+
--resource-group $RESOURCE_GROUP_NAME \
132+
--account-name $STORAGE_ACCOUNT_NAME \
133+
--query "${QUERY}")
134134

135135
# Replace returned values if null with default values
136-
protocolSettings="${protocolSettings/$replaceSmbMultichannel/$defaultSmbMultichannelEnabled}"
136+
PROTOCOL_SETTINGS="${protocolSettings/$REPLACESMBMULTICHANNEL/$DEFAULTSMBMULTICHANNELENABLED}"
137137

138138
# Print returned settings
139-
echo $protocolSettings
139+
echo $PROTOCOL_SETTINGS
140140
```
141141

142142
To enable/disable SMB Multichannel, use the `az storage account file-service-properties update` command.
143143

144144
```azurecli
145145
az storage account file-service-properties update \
146-
--resource-group $resourceGroupName \
147-
--account-name $storageAccountName \
146+
--resource-group $RESOURCE_GROUP_NAME \
147+
--account-name $STORAGE_ACCOUNT_NAME \
148148
--enable-smb-multichannel "true"
149149
```
150150
---
@@ -265,50 +265,50 @@ Update-AzStorageFileServiceProperty `
265265
To get the status of the SMB security settings, use the `az storage account file-service-properties show` command. Remember to replace `<resource-group>` and `<storage-account>` with the appropriate values for your environment before running these Bash commands.
266266

267267
```bash
268-
resourceGroupName="<resource-group>"
269-
storageAccountName="<storage-account>"
268+
RESOURCE_GROUP_NAME="<resource-group>"
269+
STORAGE_ACCOUNT_NAME="<storage-account>"
270270

271271
# If you've never changed any SMB security settings, the values for the SMB security
272272
# settings returned by Azure Files will be null. Null returned values should be interpreted
273273
# as "default settings are in effect". To make this more user-friendly, the following
274274
# PowerShell commands replace null values with the human-readable default values.
275275

276276
# Values to be replaced
277-
replaceSmbProtocolVersion="\"smbProtocolVersions\": null"
278-
replaceSmbChannelEncryption="\"smbChannelEncryption\": null"
279-
replaceSmbAuthenticationMethods="\"smbAuthenticationMethods\": null"
280-
replaceSmbKerberosTicketEncryption="\"smbKerberosTicketEncryption\": null"
277+
REPLACESMBPROTOCOLVERSION="\"smbProtocolVersions\": null"
278+
REPLACESMBCHANNELENCRYPTION="\"smbChannelEncryption\": null"
279+
REPLACESMBAUTHENTICATIONMETHODS="\"smbAuthenticationMethods\": null"
280+
REPLACESMBKERBEROSTICKETENCRYPTION="\"smbKerberosTicketEncryption\": null"
281281

282282
# Replacement values for null parameters. If you copy this into your own
283283
# scripts, you will need to ensure that you keep these variables up-to-date with any new
284284
# options we may add to these parameters in the future.
285-
defaultSmbProtocolVersions="\"smbProtocolVersions\": \"SMB2.1;SMB3.0;SMB3.1.1\""
286-
defaultSmbChannelEncryption="\"smbChannelEncryption\": \"AES-128-CCM;AES-128-GCM;AES-256-GCM\""
287-
defaultSmbAuthenticationMethods="\"smbAuthenticationMethods\": \"NTLMv2;Kerberos\""
288-
defaultSmbKerberosTicketEncryption="\"smbKerberosTicketEncryption\": \"RC4-HMAC;AES-256\""
285+
DEFAULTSMBPROTOCOLVERSIONS="\"smbProtocolVersions\": \"SMB2.1;SMB3.0;SMB3.1.1\""
286+
DEFAULTSMBCHANNELENCRYPTION="\"smbChannelEncryption\": \"AES-128-CCM;AES-128-GCM;AES-256-GCM\""
287+
DEFAULTSMBAUTHENTICATIONMETHODS="\"smbAuthenticationMethods\": \"NTLMv2;Kerberos\""
288+
DEFAULTSMBKERBEROSTICKETENCRYPTION="\"smbKerberosTicketEncryption\": \"RC4-HMAC;AES-256\""
289289

290290
# Build JMESPath query string
291-
query="{"
292-
query="${query}smbProtocolVersions: protocolSettings.smb.versions,"
293-
query="${query}smbChannelEncryption: protocolSettings.smb.channelEncryption,"
294-
query="${query}smbAuthenticationMethods: protocolSettings.smb.authenticationMethods,"
295-
query="${query}smbKerberosTicketEncryption: protocolSettings.smb.kerberosTicketEncryption"
296-
query="${query}}"
291+
QUERY="{"
292+
QUERY="${QUERY}smbProtocolVersions: protocolSettings.smb.versions,"
293+
QUERY="${QUERY}smbChannelEncryption: protocolSettings.smb.channelEncryption,"
294+
QUERY="${QUERY}smbAuthenticationMethods: protocolSettings.smb.authenticationMethods,"
295+
QUERY="${QUERY}smbKerberosTicketEncryption: protocolSettings.smb.kerberosTicketEncryption"
296+
QUERY="${QUERY}}"
297297

298298
# Get protocol settings from the Azure Files FileService object
299-
protocolSettings=$(az storage account file-service-properties show \
300-
--resource-group $resourceGroupName \
301-
--account-name $storageAccountName \
302-
--query "${query}")
299+
PROTOCOLSETTINGS=$(az storage account file-service-properties show \
300+
--resource-group $RESOURCE_GROUP_NAME \
301+
--account-name $STORAGE_ACCOUNT_NAME \
302+
--query "${QUERY}")
303303

304304
# Replace returned values if null with default values
305-
protocolSettings="${protocolSettings/$replaceSmbProtocolVersion/$defaultSmbProtocolVersions}"
306-
protocolSettings="${protocolSettings/$replaceSmbChannelEncryption/$defaultSmbChannelEncryption}"
307-
protocolSettings="${protocolSettings/$replaceSmbAuthenticationMethods/$defaultSmbAuthenticationMethods}"
308-
protocolSettings="${protocolSettings/$replaceSmbKerberosTicketEncryption/$defaultSmbKerberosTicketEncryption}"
305+
PROTOCOLSETTINGS="${protocolSettings/$REPLACESMBPROTOCOLVERSION/$DEFAULTSMBPROTOCOLVERSIONS}"
306+
PROTOCOLSETTINGS="${protocolSettings/$REPLACESMBCHANNELENCRYPTION/$DEFAULTSMBCHANNELENCRYPTION}"
307+
PROTOCOLSETTINGS="${protocolSettings/$REPLACESMBAUTHENTICATIONMETHODS/$DEFAULTSMBAUTHENTICATIONMETHODS}"
308+
PROTOCOLSETTINGS="${protocolSettings/$REPLACESMBKERBEROSTICKETENCRYPTION/$DEFAULTSMBKERBEROSTICKETENCRYPTION}"
309309

310310
# Print returned settings
311-
echo $protocolSettings
311+
echo $PROTOCOLSETTINGS
312312
```
313313

314314
Depending on your organizations security, performance, and compatibility requirements, you may wish to modify the SMB protocol settings. The following Azure CLI command restricts your SMB file shares to only the most secure options.
@@ -318,8 +318,8 @@ Depending on your organizations security, performance, and compatibility require
318318
319319
```azurecli
320320
az storage account file-service-properties update \
321-
--resource-group $resourceGroupName \
322-
--account-name $storageAccountName \
321+
--resource-group $RESOURCE_GROUP_NAME \
322+
--account-name $STORAGE_ACCOUNT_NAME \
323323
--versions "SMB3.1.1" \
324324
--channel-encryption "AES-256-GCM" \
325325
--auth-methods "Kerberos" \

0 commit comments

Comments
 (0)