Creating ONTAP 用户 - 适用于 ONTAP 的 FSx
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

Creating ONTAP 用户

要创建新用户SVM或文件系统用户 (ONTAP CLI)

只有具有该fsxadmin角色的文件系统用户才能创建新用户SVM和文件系统用户。

  1. 要访问 ONTAP CLI,通过运行以下命令在 Amazon NetApp ONTAP 文件FSx系统的管理端口上建立会SSH话。将 management_endpoint_ip 替换为文件系统管理端口的 IP 地址。

    [~]$ ssh fsxadmin@management_endpoint_ip

    有关更多信息,请参阅 使用 ONTAP CLI 管理文件系统

  2. 使用 security login create ONTAP CLI命令在您的FSxONTAP文件系统上创建新的用户帐户或SVM。

    为示例中的占位符填入数据,以定义以下必需的属性:

    • -vserver— 指定要在SVM其中创建新SVM角色或用户的名称。如果您要创建文件系统角色或用户,请不要指定SVM。

    • -user-or-group-name – 指定登录方法的用户名或 Active Directory 组名。只能使用 domain 身份验证方法以及 ontapissh 应用程序指定 Active Directory 组名。

    • -application – 指定登录方法的应用。可能的值包括 http、ontapi 和 ssh。

    • -authentication-method – 指定登录的身份验证方法。可能的值包括:

      • domain – 用于 Active Directory 身份验证

      • 密码 - 用于密码认证

      • publickey – 用于公钥身份验证

    • -role – 指定登录方法的访问控制角色名称。在文件系统级别,唯一可以指定的角色是 fsxadmin

    (可选)您还可以将以下一个或多个参数与命令配合使用:

    • [-comment] - 用于为用户账户添加注释或备注。例如,Guest account。最大长度为 128 个字符。

    • [-second-authentication-method {none|publickey|password|nsswitch}] – 指定第二种身份验证方法。您可以指定以下方法:

      • 密码 - 用于密码认证

      • publickey – 用于公钥身份验证

      • nsswitch — 用于NIS或身份验证 LDAP

      • 无 - 未指定时的默认值。

    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用户 fsxSVM,该用户配置为使用密码SSH进行登录。在提示时,提供此用户的密码。

    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 应用程序将使用该用户来收集性能和容量指标。有关更多信息,请参阅 使用 Harvest 和 Grafana 监控FSxONTAP文件系统

    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::>