本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
使用 更新 SVM Active Directory 組態 NetApp CLI
您可以使用 NetApp ONTAPCLI來加入和退出 SVM Active Directory,以及修改現有的 SVM Active Directory 組態。
使用 將 加入 SVM Active Directory ONTAP CLI
您可以使用 ONTAP SVMs將現有的 加入 Active DirectoryCLI,如下列程序所述。即使您SVM的 已加入 Active Directory,也可以這麼做。
存取 ONTAP CLI,執行下列命令,在 Amazon FSx for NetApp ONTAP file system 的管理連接埠上建立SSH工作階段。
將 取代為檔案系統管理連接埠的 IP 地址。management_endpoint_ip
[~]$
ssh fsxadmin@
management_endpoint_ip
如需詳細資訊,請參閱使用 ONTAP CLI 管理檔案系統。
-
提供完整目錄DNS名稱 (
corp.example.com
) 和至少一個DNS伺服器 IP 地址,為您的 Active Directory 建立DNS項目。::>
vserver services name-service dns create -vserver
svm_name
-domainscorp.example.com
-name-serversdns_ip_1
,dns_ip_2
若要驗證與DNS伺服器的連線,請執行下列命令。將 取代
svm_name
為您自己的資訊。FsxId0ae30e5b7f1a50b6a::>
vserver services name-service dns check -vserver
svm_name
Name Server Vserver Name Server Status Status Details ------------- --------------- ------------ -------------------------- svm_name 172.31.14.245 up Response time (msec): 0 svm_name 172.31.25.207 up Response time (msec): 1 2 entries were displayed.
-
若要SVM將 加入 Active Directory,請執行下列命令。請注意,您必須指定 Active Directory 中尚未存在
computer_name
的 ,並提供 的目錄DNS名稱-domain
。針對-OU
,輸入OUs您要SVM加入的 ,以及 DC 格式的DNS全名。::>
vserver cifs create -vserver svm_name -cifs-server
computer_name
-domaincorp.example.com
-OUOU=Computers,OU=example,DC=corp,DC=example,DC=com
若要驗證 Active Directory 連線的狀態,請執行下列命令:
::>
vserver cifs check -vserver
svm_name
Vserver : svm_name Cifs NetBIOS Name : svm_netBIOS_name Cifs Status : Running Site : Default-First-Site-Name Node Name DC Server Name DC Server IP Status Status Details --------------- -------------- --------------- ------ -------------- FsxId0ae30e5b7f1a50b6a-01 corp.example.com 172.31.14.245 up Response time (msec): 5 FsxId0ae30e5b7f1a50b6a-02 corp.example.com 172.31.14.245 up Response time (msec): 20 2 entries were displayed.
-
如果您在此聯結後無法存取共用,請判斷您用來存取共用的帳戶是否具有許可。例如,如果您使用預設
Admin
帳戶 (委派管理員) 搭配 AWS 受管 Active Directory,則必須在 中執行下列命令ONTAP。netbios_domain
對應至 Active Directory 的網域名稱 (對於corp.example.com
,此處netbios_domain
使用的 是example
)。FsxId0123456789a::>
vserver cifs users-and-groups local-group add-members -vserver svm_name -group-name BUILTIN\Administrators -member-names netbios_domain\admin
使用 修改 Active Directory 組態 ONTAP CLI
您可以使用 ONTAPCLI來修改現有的 Active Directory 組態。
存取 ONTAP CLI,執行下列命令,在 Amazon FSx for NetApp ONTAP file system 的管理連接埠上建立SSH工作階段。
將 取代為檔案系統管理連接埠的 IP 地址。management_endpoint_ip
[~]$
ssh fsxadmin@
management_endpoint_ip
如需詳細資訊,請參閱使用 ONTAP CLI 管理檔案系統。
-
執行下列命令來暫時關閉 SVM的CIFS伺服器:
FsxId0123456789a::>
vserver cifs modify -vserver
svm_name
-status-admin down -
如果您需要修改 Active Directory DNS的項目,請執行下列命令:
::>
vserver services name-service dns modify -vserver
svm_name
-domainscorp.example.com
-name-serversdns_ip_1
,dns_ip_2
您可以使用
vserver services name-service dns check -vserver svm_name
命令驗證 Active Directory DNS 伺服器的連線狀態。::>
vserver services name-service dns check -vserver
svm_name
Name Server Vserver Name Server Status Status Details ------------- --------------- ------------ -------------------------- svmciad dns_ip_1 up Response time (msec): 1 svmciad dns_ip_2 up Response time (msec): 1 2 entries were displayed.
-
如果您需要修改 Active Directory 組態本身,您可以使用下列命令來變更現有的欄位,取代:
-
computer_name
,如果您想要修改 的 NetBIOS (機器帳戶) 名稱SVM。 -
domain_name
,如果您想要修改網域名稱。這應與本節 () 步驟 3 中記下的DNS網域項目對應corp.example.com
。 -
organizational_unit
,如果您想要修改 OU (OU=Computers,OU=example,DC=corp,DC=example,DC=com
)。
您需要重新輸入您用來將此裝置加入 Active Directory 的 Active Directory 登入資料。
::>
vserver cifs modify -vserver
svm_name
-cifs-server computer_name -domaindomain_name
-OUorganizational_unit
您可以使用
vserver cifs check -vserver
命令來驗證 Active Directory 連線的連線狀態。svm_name
-
-
當您完成修改 Active Directory 和DNS組態時,請執行下列命令讓CIFS伺服器恢復:
::>
vserver cifs modify -vserver
svm_name
-status-admin up
SVM 使用 從 取消加入 Active Directory NetApp ONTAP CLI
NetApp ONTAP CLI 也可以依照下列步驟,使用 SVM 從 Active Directory 中取消您的 加入:
存取 ONTAP CLI,執行下列命令,在 Amazon FSx for NetApp ONTAP file system 的管理連接埠上建立SSH工作階段。
將 取代為檔案系統管理連接埠的 IP 地址。management_endpoint_ip
[~]$
ssh fsxadmin@
management_endpoint_ip
如需詳細資訊,請參閱使用 ONTAP CLI 管理檔案系統。
-
執行下列命令,從 Active Directory 刪除已退出您裝置的CIFS伺服器。若要ONTAP讓 刪除 的機器帳戶SVM,請提供您最初用來SVM將 加入 Active Directory 的登入資料。
FsxId0123456789a::>
vserver cifs modify -vserver
svm_name
-status-admin down -
如果您需要修改 Active Directory DNS的項目,請執行下列命令:
FsxId0123456789a::
vserver cifs delete -vserver
svm_name
In order to delete an Active Directory machine account for the CIFS server, you must supply the name and password of a Windows account with sufficient privileges to remove computers from the "CORP.ADEXAMPLE.COM" domain. Enter the user name:
user_name
Enter the password: Warning: There are one or more shares associated with this CIFS server Do you really want to delete this CIFS server and all its shares? {y|n}:y
-
執行下列命令來刪除 Active Directory 的DNS伺服器:
::
vserver services name-service dns delete -vserver
svm_name
如果您看到如下所示的警告 - 指出
dns
應該將其移除為ns-switch
- 而且您不打算將此裝置重新加入 Active Directory,您可以移除ns-switch
項目。Warning: "DNS" is present as one of the sources in one or more ns-switch databases but no valid DNS configuration was found for Vserver "svm_name". Remove "DNS" from ns-switch using the "vserver services name-service ns-switch" command. Configuring "DNS" as a source in the ns-switch setting when there is no valid configuration can cause protocol access issues.
-
(選用) 執行下列命令
dns
來移除ns-switch
的項目。驗證來源順序,然後修改 以移除hosts
資料庫dns
的項目,sources
使其僅包含列出的其他來源。在此範例中,唯一的其他來源是files
。::>
vserver services name-service ns-switch show -vserver
svm_name
-database hostsVserver: svm_name Name Service Switch Database: hosts Name Service Source Order: files, dns
::>
vserver services name-service ns-switch modify -vserver
svm_name
-database hosts -sources files -
(選用) 將資料庫主機
sources
的 修改為僅包含 ,以移除dns
項目files
。::>
vserver services name-service ns-switch modify -vserver svm_name -database hosts -sources files