いままでも「SMB2 Enabled for DC Connections設定に起因する接続できない問題」というのがあったが、先日話題になった「Active Directoryサーバのセキュリティ強化アップデート(CVE-2022-38023)に伴うONTAPファイルサーバへの影響」で、2023年7月以降のActive Directory環境ではONTAP をCIFSに新規作成しようとした場合にエラーがでる、という問題が出ていた。
「Is AES Encryption Enabled設定」と「AES session key enabled for NetLogon channel設定」の2つの設定を変更する必要がある。
前者はONTAP 9.12.1から初期値変更、後者はONTAP 9.10.1から初期値変更となっているので、最近導入している場合は問題が発生しないのだが、以前のバージョンからアップデートしているような環境の場合は以前の値のままとなっているため注意が必要となっている。
その1: Is AES Encryption Enabled 設定
以前からONTAPを使っていてアップデートしているような環境では、SMB内部接続での暗号化形式でAESを使わない、という設定になっているせいで、下記の様なエラーとなる。
1 | netapp9101::> vserver cifs create -vserver svm3 -cifs-server svm3 -domain adosakana.local |
2 |
3 | In order to create an Active Directory machine account for the CIFS server, you must supply the name and password of a Windows account with |
4 | sufficient privileges to add computers to the "CN=Computers" container within the "ADOSAKANA.LOCAL" domain. |
5 |
6 | Enter the user name: administrator |
7 |
8 | Enter the password: |
9 |
10 | Error: Machine account creation procedure failed |
11 | [ 47] Loaded the preliminary configuration. |
12 | [ 130] Created a machine account in the domain |
13 | [ 130] SID to name translations of Domain Users and Admins |
14 | completed successfully |
15 | [ 131] Successfully connected to ip 172.17.44.49, port 88 using |
16 | TCP |
17 | [ 142] Successfully connected to ip 172.17.44.49, port 464 using |
18 | TCP |
19 | [ 233] Kerberos password set for 'SVM3$@ADOSAKANA.LOCAL' succeeded |
20 | [ 233] Set initial account password |
21 | [ 244] Successfully connected to ip 172.17.44.49, port 445 using |
22 | TCP |
23 | [ 276] Successfully connected to ip 172.17.44.49, port 88 using |
24 | TCP |
25 | [ 311] Successfully authenticated with DC |
26 | adserver.adosakana.local |
27 | [ 324] Unable to connect to NetLogon service on |
28 | adserver.adosakana.local (Error: |
29 | RESULT_ERROR_GENERAL_FAILURE) |
30 | **[ 324] FAILURE: Unable to make a connection |
31 | ** (NetLogon:ADOSAKANA.LOCAL), result: 3 |
32 | [ 324] Unable to make a NetLogon connection to |
33 | adserver.adosakana.local using the new machine account |
34 | [ 346] Deleted existing account |
35 | 'CN=SVM3,CN=Computers,DC=adosakana,DC=local' |
36 |
37 | Error: command failed: Failed to create the Active Directory machine account "SVM3". Reason: general failure. |
38 |
39 | netapp9101::> |
この問題はマニュアルの「Enable or disable AES encryption for Kerberos-based communication」に記載されているように「is-aes-encryption-enabled」設定をtrueに変更することで解決する。
1 | netapp9101::> vserver cifs security modify -vserver svm3 -is-aes-encryption-enabled true |
2 | netapp9101::> vserver cifs security show -fields is-aes-encryption-enabled |
3 | vserver is-aes-encryption-enabled |
4 | ------- ------------------------- |
5 | Cluster - |
6 | Snapmirror-WAN |
7 | - |
8 | netapp9101 |
9 | - |
10 | netapp9101-01 |
11 | - |
12 | svm0 true |
13 | svm2 false |
14 | svm3 true |
15 | 7 entries were displayed. |
16 |
17 | netapp9101::> |
その2: AES session key enabled for NetLogon channel 設定
上記を設定しても、下記の様なエラーとなった。
1 | netapp9101::> vserver cifs create -vserver svm3 -cifs-server svm3 -domain vm2.adosakana.local |
2 |
3 | In order to create an Active Directory machine account for the CIFS server, you must supply the name and password of |
4 | a Windows account with sufficient privileges to add computers to the "CN=Computers" container within the |
5 | "ADOSAKANA.LOCAL" domain. |
6 |
7 | Enter the user name: administrator |
8 |
9 | Enter the password: |
10 |
11 | Error: Machine account creation procedure failed |
12 | [ 43] Loaded the preliminary configuration. |
13 | [ 133] Created a machine account in the domain |
14 | [ 133] SID to name translations of Domain Users and Admins |
15 | completed successfully |
16 | [ 134] Successfully connected to ip 172.17.44.49, port 88 using |
17 | TCP |
18 | [ 144] Successfully connected to ip 172.17.44.49, port 464 using |
19 | TCP |
20 | [ 226] Kerberos password set for 'SVM3$@ADOSAKANA.LOCAL' succeeded |
21 | [ 226] Set initial account password |
22 | [ 253] Successfully connected to ip 172.17.44.49, port 445 using |
23 | TCP |
24 | [ 284] Successfully connected to ip 172.17.44.49, port 88 using |
25 | TCP |
26 | [ 316] Successfully authenticated with DC |
27 | adserver.adosakana.local |
28 | [ 323] Encountered NT error (NT_STATUS_PENDING) for SMB command |
29 | Read |
30 | [ 327] Unable to connect to NetLogon service on |
31 | adserver.adosakana.local (Error: |
32 | RESULT_ERROR_GENERAL_FAILURE) |
33 | **[ 327] FAILURE: Unable to make a connection |
34 | ** (NetLogon:ADOSAKANA.LOCAL), result: 3 |
35 | [ 327] Unable to make a NetLogon connection to |
36 | adserver.adosakana.local using the new machine account |
37 | [ 344] Deleted existing account |
38 | 'CN=SVM3,CN=Computers,DC=ADOSAKANA,DC=local' |
39 |
40 | Error: command failed: Failed to create the Active Directory machine account "SVM3". Reason: general failure. |
41 |
42 | netapp9101::> |
この状況となった環境のActive Directoryサーバはsambaで作成しているため /usr/local/samba/var/log.samba を確認してみると下記のエラーがでていた。
1 | [2023/10/20 14:48:22.301935, 0] ../../source4/rpc_server/netlogon/dcerpc_netlogon.c:281(dcesrv_netr_ServerAuthenticate3_check_downgrade) |
2 | CVE-2022-38023: client_account[SVM3$] computer_name[SVM3] schannel_type[2] client_negotiate_flags[0x741ff] real_account[SVM3$] NT_STATUS_DOWNGRADE_DETECTED reject_des[0] reject_md5[1] |
3 | [2023/10/20 14:48:22.302215, 0] ../../source4/rpc_server/netlogon/dcerpc_netlogon.c:291(dcesrv_netr_ServerAuthenticate3_check_downgrade) |
4 | CVE-2022-38023: Check if option 'server reject md5 schannel:SVM3$ = no' might be needed for a legacy client. |
5 | [2023/10/20 14:48:22.304539, 0] ../../source4/rpc_server/netlogon/dcerpc_netlogon.c:281(dcesrv_netr_ServerAuthenticate3_check_downgrade) |
6 | CVE-2022-38023: client_account[SVM3$] computer_name[SVM3] schannel_type[2] client_negotiate_flags[0x701ff] real_account[SVM3$] NT_STATUS_DOWNGRADE_DETECTED reject_des[1] reject_md5[1] |
7 | [2023/10/20 14:48:22.304600, 0] ../../source4/rpc_server/netlogon/dcerpc_netlogon.c:291(dcesrv_netr_ServerAuthenticate3_check_downgrade) |
8 | CVE-2022-38023: Check if option 'server reject md5 schannel:SVM3$ = no' might be needed for a legacy client. |
9 | [2023/10/20 14:48:22.304638, 0] ../../source4/rpc_server/netlogon/dcerpc_netlogon.c:298(dcesrv_netr_ServerAuthenticate3_check_downgrade) |
10 | CVE-2022-38023: Check if option 'allow nt4 crypto:SVM3$ = yes' might be needed for a legacy client. |
もしやkerneberosではなくNTLMで接続されてたりする?と lm-compatibility-level をkrb に設定しても同じ結果となった。
1 | netapp9101::> vserver cifs security modify -vserver svm3 -lm-compatibility-level krb |
2 |
3 | netapp9101::> vserver cifs security show -fields lm-compatibility-level |
4 | vserver lm-compatibility-level |
5 | ------- ---------------------- |
6 | Cluster - |
7 | Snapmirror-WAN - |
8 | netapp9101 - |
9 | netapp9101-01 - |
10 | svm0 lm-ntlm-ntlmv2-krb |
11 | svm2 lm-ntlm-ntlmv2-krb |
12 | svm3 krb |
13 | 7 entries were displayed. |
14 |
15 | netapp9101::> |
さらに調べると「Configure Active Directory domain controller access overview」に、Netlogon にAESを使いたい場合は「aes-enabled-for-netlogon-channel」をtrueに設定する、と書いてあった
1 | netapp9101::> vserver cifs security show -fields aes-enabled-for-netlogon-channel |
2 | vserver aes-enabled-for-netlogon-channel |
3 | ------- -------------------------------- |
4 | Cluster - |
5 | Snapmirror-WAN - |
6 | netapp9101 - |
7 | netapp9101-01 - |
8 | svm0 false |
9 | svm2 false |
10 | svm3 false |
11 | 7 entries were displayed. |
12 |
13 | netapp9101::> vserver cifs security modify -vserver svm3 -aes-enabled-for-netlogon-channel true |
14 |
15 | netapp9101::> vserver cifs security show -fields aes-enabled-for-netlogon-channel |
16 | vserver aes-enabled-for-netlogon-channel |
17 | ------- -------------------------------- |
18 | Cluster - |
19 | Snapmirror-WAN - |
20 | netapp9101 - |
21 | netapp9101-01 - |
22 | svm0 false |
23 | svm2 false |
24 | svm3 true |
25 | 7 entries were displayed. |
26 |
27 | netapp9101::> |
設定変更後に再実行したところ、Active Directory参加に成功した。
1 | netapp9101::> vserver cifs create -vserver svm3 -cifs-server svm3 -domain adosakana.local |
2 |
3 | In order to create an Active Directory machine account for the CIFS server, you must supply the name and password of |
4 | a Windows account with sufficient privileges to add computers to the "CN=Computers" container within the |
5 | "ADOSAKANA.LOCAL" domain. |
6 |
7 | Enter the user name: administrator |
8 |
9 | Enter the password: |
10 |
11 | Notice: SMB1 protocol version is obsolete and considered insecure. Therefore it is deprecated and disabled on this |
12 | CIFS server. Support for SMB1 might be removed in a future release. If required, use the (privilege: advanced) |
13 | "vserver cifs options modify -vserver svm3 -smb1-enabled true" to enable it. |
14 |
15 | netapp9101::> |
↑のSMB1を有効にするかどうか、というところについては、複合機の出力先として指定されている、とか、LinuxサーバからCIFSでマウントしている、とか、Windowsワークグループからアクセスしている、という場合には有効にする、というような形となる。