建立 ONTAP 使用者 - 適用於 ONTAP 的 FSx

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

建立 ONTAP 使用者

建立新的SVM或檔案系統使用者 (ONTAPCLI)

只有具有該fsxadmin角色的檔案系統使用者才能建立新的SVM和檔案系統使用者。

  1. 若要存取 NetApp ONTAPCLI,請執行下列命令,在 Amazon FSx NetApp ONTAP 檔案系統的管理連接埠上建立SSH工作階段。取代management_endpoint_ip為檔案系統管理連接埠的 IP 位址。

    [~]$ ssh fsxadmin@management_endpoint_ip

    如需詳細資訊,請參閱使用 ONTAP CLI 管理檔案系統

  2. 使用指security login createONTAPCLI令在您的ONTAP檔案系統或上建立新FSx的使用者帳戶SVM。

    在範例中插入預留位置的資料,以定義下列必要屬性:

    • -vserver— 指定您要SVM在其中建立新SVM角色或使用者的名稱。如果您要建立檔案系統角色或使用者,請勿指定SVM.

    • -user-or-group-name— 指定登入方法的使用者名稱或使用中目錄群組名稱。使用中的目錄群組名稱只能使用domain驗證方法和ontapissh應用程式來指定。

    • -application— 指定登入方法的應用程式。可能的值包括 HTTP, 安全碼, 和 SSH.

    • -authentication-method— 指定登入的驗證方法。可能的值包括以下:

      • 網域 — 用於作用中目錄驗證

      • 密碼 — 用於密碼認證

      • 公開金鑰 — 公開金鑰認證的使用者

    • -role— 指定登入方法的存取控制角色名稱。在檔案系統層級上,唯一可以指定的角色是fsxadmin

    (選擇性) 您也可以搭配指令使用下列一或多個參數:

    • [-comment]— 用來包含使用者帳戶的符號或註解。例如:Guest account。長度上限為 128 個字元。

    • [-second-authentication-method {none|publickey|password|nsswitch}]— 指定第二因素驗證方法。您可以指定下列方法:

      • 密碼 — 用於密碼認證

      • 公開金鑰 — 用於公開金鑰驗證

      • NSswitch — 用於NIS或LDAP驗證

      • none — 如果您未指定預設值

    Fsx0123456::> security login create -vserver vserver_name -user-or-group-name user_or_group_name -application login_application -authentication-method auth_method -role role_or_account_name

    下列指令會建立具有指定fsxadmin-readonly角色new_fsxadmin的新檔案系統使SSH用者,並使用登入密碼。出現提示時,請為使用者提供密碼。

    Fsx0123456::> security login create -user-or-group-name new_fsxadmin -application ssh -authentication-method password -role fsxadmin-readonly Please enter a password for user 'new_fsxadmin': Please enter it again: Fsx0123456::>
  3. 下列指令會在vsadmin_readonly角色new_vsadmin上建立新使用SVM者,並設定為SSH搭配密碼來登入。fsx SVM出現提示時,請為使用者提供密碼。

    Fsx0123456::> security login create -vserver fsx -user-or-group-name new_vsadmin -application ssh -authentication-method password -role vsadmin-readonly Please enter a password for user 'new_vsadmin': Please enter it again: Fsx0123456::>
  4. 下列指令會建立新的唯讀檔案系統使harvest2-user用者,以供 NetApp Harvest 應用程式用來收集效能和容量測量結果。如需詳細資訊,請參閱使用收穫和 Grafana 監控 FSx 的 ONTAP 文件系統

    Fsx0123456::> security login create -user-or-group-name harvest2-user -application ssh -role fsxadmin-readonly -authentication-method password
若要檢視所有檔案系統與SVM使用者的資訊
  • 使用下列指令來檢視檔案系統和的所有登入資訊SVMs。

    Fsx0123456::> security login show Vserver: Fsx0123456 Second User/Group Authentication Acct Authentication Name Application Method Role Name Locked Method -------------- ----------- ------------- ---------------- ------ -------------- autosupport console password autosupport no none fsxadmin http password fsxadmin no none fsxadmin ontapi password fsxadmin no none fsxadmin ssh password fsxadmin no none fsxadmin ssh publickey fsxadmin - none new_fsxadmin ssh password fsxadmin-readonly no none Vserver: fsx Second User/Group Authentication Acct Authentication Name Application Method Role Name Locked Method -------------- ----------- ------------- ---------------- ------ -------------- new_vsadmin ssh password vsadmin-readonly no none vsadmin http password vsadmin yes none vsadmin ontapi password vsadmin yes none vsadmin ssh password vsadmin yes none 10 entries were displayed. Fsx0123456::>