

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

# 在 SMB 伺服器上建立本機使用者帳戶
<a name="smb-workgroup-create-local-accounts"></a>

您可以建立本機使用者帳戶，用來授權透過 SMB 連線存取 SVM 中包含的資料。您也可以在建立 SMB 工作階段時使用本機使用者帳戶進行身分驗證。SVM 建立時，預設會啟用本機使用者功能。建立本機使用者帳戶時，您必須指定使用者名稱，而且必須指定要與帳戶建立關聯的 SVM。

**在 SMB 伺服器上建立本機使用者帳戶**

1. 使用 CLI [https://docs.netapp.com/us-en/ontap-cli/vserver-cifs-users-and-groups-local-user-create.html](https://docs.netapp.com/us-en/ontap-cli/vserver-cifs-users-and-groups-local-user-create.html) ONTAP 命令建立本機使用者：

   ```
   vserver cifs users-and-groups local-user create -vserver {{svm_name}} -user-name {{user_name}} optional_parameters
   ```

   下列選用參數可能很有用：
   + `-full-name` – 使用者的全名。
   + `-description` – 本機使用者的描述。
   + `-is-account-disabled {true|false}` – 指定使用者帳戶是啟用或停用。如果未指定此參數，則預設為啟用使用者帳戶。

   命令會提示輸入本機使用者的密碼。

1. 輸入本機使用者的密碼，然後確認密碼。

1. 確認使用者已成功建立：

   ```
   vserver cifs users-and-groups local-user show -vserver {{svm_name}}
   ```

下列範例會建立與 SVM 相關聯的本機使用者 `Sue Chang`，`SMB_SERVER01\sue`其全名為 `svm1`：

```
FSxIdabcde123456::> vserver cifs users-and-groups local-user create -vserver svm1 ‑user-name SMB_SERVER01\sue -full-name "Sue Chang"

Enter the password:
Confirm the password:
```

```
FSxIdabcde123456::> vserver cifs users-and-groups local-user show
Vserver  User Name                  Full Name  Description
-------- -------------------------- ---------- -------------
svm1     SMB_SERVER01\Administrator            Built-in administrator account
svm1     SMB_SERVER01\sue           Sue Chang
```