Configures user along with role for local authentication.
Config mode
This command is available only to users with admin role.
Error message | Reason |
---|---|
Username validation error | Username length should be between 1 and 40 characters.
Username should contain only alpha-numeric, underscore and period. Username first letter is neither alpha-numeric nor an underscore. |
Role validation error | Role does not exist. |
Password validation error | Password has a bad length/size. |
The following example configures users with admin and user roles.
NPB# configure terminal NPB(config)# username testuser1 role admin password password123 encryption-level 0 NPB(config)# username testuser2 role user password $6$salt$cevuzTZ/QBjzuZG0/ebEeedmcTnhyM8ITUu8K032Cp2XvIibq7voqYagm18bwpLBqrg/l/l6YxTmKKibJz5r10 encryption-level 10 NPB# 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