< Home

user-manage user-import

Function

The user-manage user-import command imports users in a batch from a CSV file.

Format

user-manage user-import csv-file [ auto-create-group | override ] *

Parameters

Parameter Description Value
csv-file Specifies the name of an imported CSV file. The value is a case-sensitive string of 5 to 31 characters. Spaces are not supported. The file is in the [ file-path ] file-name.csv format.
auto-create-group When the user group or security group of a user in the CSV file does not exist on the device, the device automatically creates the group. If the parameter is not specified, users are imported to the /default user group. -
override When a login name already exists on the device, the device updates the attributes of this user. If the parameter is not specified, the user is not imported. -

Views

System view

Default Level

3: Management level

Usage Guidelines

Before you import a CSV file, log in to the Web UI of the device, choose Object > User > User Import > Local Import to download a CSV template in User Import, and edit the CSV file based on the requirements described in the CSV template.

The user-manage user-import command imports users from the specified CSV file on the storage device.

  • When the file path on the device is specified in csv-file, the imported CSV file is the file in the specified path.
  • When only the file name is specified in csv-file, the imported CSV file is the file in the default path.

When a login name already exists on the device, the user is not imported by default. If no group path is specified for a user, the device imports the user to the /default group by default.

If the number of users reaches the upper limit when you import user information, the import is terminated. If a user entry in a CSV file is invalid, the invalid user entry and subsequent entries cannot be imported. However, in the two scenarios, the imported user information still takes effect.

After the import succeeds, the user information is saved in the memory of the device, but cannot survive a device restart. To avoid the data loss, run the Save command to save the user information to a storage device such as a CF card.

During the import process, you cannot perform any operation on the user or user group database, for example, creating, deleting, modifying, or querying a user or user group.

Importing a CSV file is not allowed when another administrator is exporting the user and user group information into the CSV file.

Example

# Import user information from file abc.csv.

<sysname> system-view
[sysname] user-manage user-import abc.csv
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >