CPM - Username must contain only alphanumeric characters. Error code:8019
Symptom
Failed to change password for Cisco router user, getting "EXT01::Invalid Username - Username must contain only alphanumeric characters. Error code:8019".
pm_error.log
==========
CACPM250E Operation on remote machine on password object Safe: xxxxx, Folder: xxxx, Object: xxxxxx failed (try #0) with the following error: Execution error. EXT01::Invalid Username - Username must contain only alphanumeric characters. Error code:8019
Additional restrictions for forbidden characters implemented base on Idira Security Bulletin CA20-02
Environment
10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;11.9;11.8;12.4;12.3;12.5;12.6;12.7;13.0;13.2;13.1 Privileged Access Manager (PAM, self-hosted) Central Policy Manager (CPM) PAS
CPM
Cause
The reason because the username contain blacklisted characters which meet the CiscoProcess.ini exception check.
The default value for CheckUsernameForBlackList is only accepting alphanumeric characters for username.
Resolution
Default Value from CiscoProcess.ini under [States] section:
CheckUsernameForBlackList=(script) set bContainsBlacklistCharsOrWords [expr {![string is alnum "<username>"]||[string match -nocase "password" "<username>"]}];
change "alnum" to any one of the "<prefered class>" at the bottom to meet username characters.(do not put the quotes in the file.)
It should now written as below :
CheckUsernameForBlackList=(script) set bContainsBlacklistCharsOrWords [expr {![string is <prefered class> "<username>"]||[string match -nocase "password" "<username>"]}];
Below are the <prefered class> that fit your username's characters:-
alnum, alpha, ascii, asciialnum, asciialpha, number or wordchar
Example:
========
Example 1 if username contain special characters so we can use class ascii:
CheckUsernameForBlackList=(script) set bContainsBlacklistCharsOrWords [expr {![string is ascii "<username>"]||[string match -nocase "password" "<username>"]}];
Example 2 if username only can accept number, so we can use class number:
CheckUsernameForBlackList=(script) set bContainsBlacklistCharsOrWords [expr {![string is number "<username>"]||[string match -nocase "password" "<username>"]}];