

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

# 使用 AWS CloudHSM Management Utility 建立 HSM 使用者
<a name="create-users-cmu"></a>

在 AWS CloudHSM Management Utility (CMU) **createUser**中使用 在硬體安全模組 (HSM) 上建立新使用者。您必須以 CO 的身份登入才能建立使用者。

**如要建立新的 CO 使用者**

1. 使用設定工具來更新 CMU 組態。

------
#### [ Linux ]

   ```
   $ sudo /opt/cloudhsm/bin/configure --cmu <IP address>
   ```

------
#### [ Windows ]

   ```
   PS C:\> & "C:\Program Files\Amazon\CloudHSM\configure.exe" --cmu <IP address>
   ```

------

1. 啟動 CMU。

------
#### [ Linux ]

   ```
   $ /opt/cloudhsm/bin/cloudhsm_mgmt_util /opt/cloudhsm/etc/cloudhsm_mgmt_util.cfg
   ```

------
#### [ Windows ]

   ```
   PS C:\> & "C:\Program Files\Amazon\CloudHSM\cloudhsm_mgmt_util.exe" C:\ProgramData\Amazon\CloudHSM\data\cloudhsm_mgmt_util.cfg
   ```

------

1. 以 CO 使用者身分登入 HSM。

   ```
   aws-cloudhsm > loginHSM CO admin co12345
   ```

   請確定連線 CMU 清單的數目與叢集中的 HSM 數目相符。如不符，請登出並重新啟動。

1. 使用 **createUser** 來建立名為 **example\$1officer** 的 CO 使用者，密碼為 **password1**。

   ```
   aws-cloudhsm > createUser CO example_officer password1
   ```

   CMU 會提示您建立使用者操作。

   ```
   *************************CAUTION********************************
   This is a CRITICAL operation, should be done on all nodes in the
   cluster. AWS does NOT synchronize these changes automatically with the
   nodes on which this operation is not executed or failed, please
   ensure this operation is executed on all nodes in the cluster.
   ****************************************************************
   
   Do you want to continue(y/n)?
   ```

1. 輸入 **y**。

**如要建立新的 CU 使用者**

1. 使用設定工具來更新 CMU 組態。

------
#### [ Linux ]

   ```
   $ sudo /opt/cloudhsm/bin/configure --cmu <IP address>
   ```

------
#### [ Windows ]

   ```
   PS C:\> & "C:\Program Files\Amazon\CloudHSM\configure.exe" --cmu <IP address>
   ```

------

1. 啟動 CMU。

------
#### [ Linux ]

   ```
   $ /opt/cloudhsm/bin/cloudhsm_mgmt_util /opt/cloudhsm/etc/cloudhsm_mgmt_util.cfg
   ```

------
#### [ Windows ]

   ```
   PS C:\> & "C:\Program Files\Amazon\CloudHSM\cloudhsm_mgmt_util.exe" C:\ProgramData\Amazon\CloudHSM\data\cloudhsm_mgmt_util.cfg
   ```

------

1. 以 CO 使用者身分登入 HSM。

   ```
   aws-cloudhsm > loginHSM CO admin co12345
   ```

   請確定連線 CMU 清單的數目與叢集中的 HSM 數目相符。如不符，請登出並重新啟動。

1. 使用 **createUser** 來建立名為 **example\$1user** 的 CU 使用者，密碼為 **password1**。

   ```
   aws-cloudhsm > createUser CU example_user password1
   ```

   CMU 會提示您建立使用者操作。

   ```
   *************************CAUTION********************************
   This is a CRITICAL operation, should be done on all nodes in the
   cluster. AWS does NOT synchronize these changes automatically with the
   nodes on which this operation is not executed or failed, please
   ensure this operation is executed on all nodes in the cluster.
   ****************************************************************
   
   Do you want to continue(y/n)?
   ```

1. 輸入 **y**。

如需 **createUser** 的詳細資訊，請參閱 [createUser](cloudhsm_mgmt_util-createUser.md)。