71
Usage guidelines
You can import the user account information back to the device or to other devices that support the
local-user-import
command. Before the import, you can edit the .csv file as needed. However, you
must follow the restrictions in "
The device supports TFTP and FTP file transfer modes.
describes the valid URL formats of
the .csv file.
Table 5 URL formats
Protocol
URL format
Description
TFTP
tftp://server
/
path
/
filename
Specify a TFTP server by IP address or
hostname. For example, specify the file path
as
tftp://1.1.1.1/user/user.csv
.
FTP
•
With FTP user name and
password:
ftp://username
:
password@server
/
path
/
filename
•
Without FTP user name and
password:
ftp://server
/
path
/
filename
Specify an FTP server by IP address or
hostname.
The device ignores the domain name in the
FTP user name.
For example, specify the file path as
ftp://1:[email protected]/user/user.csv
or
ftp://1.1.1.1/user/user.csv
.
Examples
# Export local guest account information to the
guest.csv
file in the
<Sysname> system-view
[Sysname] local-user-export class network guest url ftp://1.1.1.1/user/guest.csv
Related commands
local-user-import
local-user-import
Use
local-user-import
to import local guest account information from a .csv file in the specified path
to the device to create local guests based on the imported information.
Syntax
local-user-import class network guest url
url-string
validity-datetime
start-date start-time
to
expiration-date expiration-time
[
auto-create-group
|
override
|
start-line
line-number
] *
Views
System view
Predefined user roles
network-admin
Parameters
class
: Specifies the local user type.
network
: Specifies the network access user.
guest
: Specifies the local guest.
url
url-string
: Specifies the source file path. The
url-string
argument is a case-insensitive string of 1
to 255 characters.
validity-datetime
: Specifies the guest validity period of the local guests.