username

Configures user along with role for local authentication.

Syntax

username username role role password password [ encryption-level 0 | 10 ]
no username username

Parameters

username
Specifies the user name. The username supports 1-32 characters. Characters allowed are alpha-numeric, underscore, and dot. Underscore is not allowed as the first character.
role
Specifies the predefined role to be assigned to the user. The supported roles are admin and user.
The role supports 1-32 characters. Characters allowed are alpha-numeric, underscore and dot. Underscore is not allowed as the first character.
password
Specifies the password of the user. Supported length of the plain text password is 8-40 and 8-128 for hashed passwords.
encryption-level 0 | 10
Specifies whether the password input is encrypted. The values 0 and 10 indicate clear-text and encryption. The default value is 0.

Modes

Config mode

Usage Guidelines

This command is available only to users with the admin role.

Examples

The following example configures users with admin and user roles.

device# configure terminal 
device(config)# username testuser1 role admin password password123 encryption-level 0 
device(config)# username testuser2 role user password 
$6$salt$cevuzTZ/QBjzuZG0/ebEeedmcTnhyM8ITUu8K032Cp2XvIibq7voqYagm18bwpLBqrg
/l/l6YxTmKKibJz5r10 encryption-level 10 

device# show running-config username 
username testuser1 role admin password 
$6$salt$cevuzTZ/QBjzuZG0/ebEeedmcTnhyM8ITUu8K032Cp2XvIibq7voqYagm18bwpLBqrg
/l/l6YxTmKKibJz5r10 encryption-level 10 
username testuser2 role user password 
$6$salt$cevuzTZ/QBjzuZG0/ebEeedmcTnhyM8ITUu8K032Cp2XvIibq7voqYagm18bwpLBqrg
/l/l6YxTmKKibJz5r10 encryption-level 10