52
Parameters
username-prefix
name-prefix
: Specifies the name prefix. The
name-prefix
argument is a
case-sensitive string of 1 to 45 characters. The prefix cannot contain any of the following characters:
forward slash (/), backslash (\), vertical bar (|), colon (:), asterisk (*), question mark (?), left angle
bracket (<), right angle bracket (>), and at sign (@).
password-prefix
password-prefix
: Specifies a prefix for the plaintext password. The
password-prefix
argument is a case-sensitive string of 1 to 53 characters. If you do not specify a
password prefix, the device randomly generates passwords for the local guests.
suffix
suffix-number
: Specifies the start suffix number of the username and password. The
suffix-number
argument is a numeric string of 1 to 10 digits.
group
group-name
: Specifies a user group by the name. The
group-name
argument is a
case-sensitive string of 1 to 32 characters. If you do not specify a user group, the guests are
assigned to the system-defined user group
system
.
count
user-count
: Specifies the number of local guests to be created. The value range for the
user-count
argument is 1 to 256.
validity-datetime
: Specifies the validity period of the local guests.
start-date
: Specifies the start date of the validity period, in the format of MM/DD/YYYY or
YYYY/MM/DD. The value range for the MM argument is 1 to 12. The value range for the DD
argument varies with the specified month. The value range for the YYYY argument is 2000 to 2035.
start-time
: Specifies the start time of the validity period, in the format of hh:mm:ss. The value range
for the hh argument is 0 to 23. The value range for the mm and ss arguments is 0 to 59. The mm and
ss arguments are optional. For example, enter 1 to indicate 1:00:00. A value of 0 indicates 00:00:00.
to
: Specifies the end date and time of the validity period.
expiration-date
: Specifies the expiration date in the format of MM/DD/YYYY or YYYY/MM/DD. The
value range for the MM argument is 1 to 12. The value range for the DD argument varies with the
specified month. The value range for the YYYY argument is 2000 to 2035.
expiration-time
: Specifies the expiration time in the format of hh:mm:ss. The value range for the hh
argument is 0 to 23. The value range for the mm and ss arguments is 0 to 59. The mm and ss
arguments are optional. For example, enter 1 to indicate 1:00:00. A value of 0 indicates 00:00:00.
Usage guidelines
Account names of batch created local guests start with the same string specified by the name prefix,
and end with a different number as the suffix. The system increases the start suffix number by 1 for
each new local guest created in the batch.
The device generates plaintext passwords by using the password prefix and suffix number in the
same way it batch creates the local guest names.
Consider the system resources when you specify the number of local guests to create. The device
might fail to create all accounts for a large batch of local guests because of insufficient resources.
If a local guest to be created has the same name as an existing local guest on the device, the new
guest overrides the existing guest.
Examples
# Create 20 local guests in batch with user names
abc01
through
abc20
for user group
visit
. The
user accounts are effective from 2014/10/01 00:00:00 to 2015/10/02 12:00:00.
<Sysname> system-view
[Sysname] local-guest generate username-prefix abc suffix 01 group visit count 20
validity-datetime 2014/10/01 00:00:00 to 2015/10/02 12:00:00
Related commands
local-user