< Home

Importing Users and User Groups from a CSV File

This section describes how to create users and user groups in batches by importing users and user groups from a CSV file to a FW.

Prerequisites

Have available a CSV file. A CSV file can be obtained in either of the following ways:

  • Exporting user information on a FW into a CSV file. For details on how to export a CSV file, see Follow-up Procedure in Configuring User Authentication in the Online Behavior Management Scenario.

  • Choose Object > User > User Import > Local Import > Import User to download a CSV template. Read the instructions on the CSV template and fill in user information. Figure 1 shows a CSV file.

    • The CSV file can contain Chinese characters, English letters, digits, and special characters.
    • A login name and security group name cannot contain any slashes (/), commas (,), quotation marks ("), question marks (?), or at sign (@). A group path cannot contain quotation marks (").

    • The CSV template supports two account expiration time formats: YYYY/MM/DD HH:MM:SS and YYYY-MM-DD HH:MM:SS. If the time format is incorrect, the import will fail. After the CSV file is edited and saved on a management PC, the account expiration time format automatically changes to the date format of the management PC. For example, if the date format on the management PC is MM/DD/YYYY, after the CSV file is saved, the account expiration time format automatically changes from YYYY/MM/DD to MM/DD/YYYY. If you import the CSV file to the FW, the import fails. Therefore, before importing the CSV file, ensure that the date format of the management PC is one of the formats supported by the FW.
    • During local authentication, the login name and local password are mandatory in the CSV file. During server authentication (using a third-party server), the login name is mandatory in the CSV file.
    • A group path must start with the authentication domain. For example, /default/research indicates the research group in the default authentication domain. To import users to another authentication domain, proceed to Create an Authentication Domain.
    Figure 1 CSV file format

Context

The following rules apply when you import users and user groups in batches:

  • The name of a CSV file must end with the extension .csv.
  • If the number of users reaches the upper limit, the import process stops, and no more users can be imported. If the attribute of a user in the CSV file is invalid, this user and subsequent users cannot be imported.
  • After a CSV file is successfully imported, user information only exists in the memory. Save configurations immediately. Otherwise, user information may be lost after the FW restarts.
  • In the dual-system hot backup scenario, you need to import a CSV file to both the active and standby FWs. This is because the active FW does not automatically synchronize the imported users to the standby FW.
  • During user/user group information import, a user group with no users cannot be imported to the device.

Procedure

  1. Choose Object > User > User Import > Local Import.
  2. In Import User, set parameters for importing users and user groups.

    Parameter

    Description

    Import User File

    Click Browse, select the edited CSV file, and click Open.

    Automatically add user and security groups

    If you select this check box and a user group/security group does not exist in the CSV file, the FW automatically creates the group/security group. If you do not select this check box and a user group/security group does not exist in the CSV file, users are imported to the /default user group.

    Overwrite existing user records

    If you select this check box and a user already exists, the FW overwrites the original user attributes. If this check box is not selected, the FW skips the user.

  3. Click Import.

    The import may take some time. Please wait.

    After the import is complete, you can view the imported users and user groups in the authentication domains of the users.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >