Regex pattern for username inconsistent CLI vs. WebUI

philippt

Active Member
Nov 21, 2018
12
2
43
75
Hi,

I have created several users via the WebUI which always contain an underscore in their username. This works:
2020_10_20_14_21_01_jane_Proxmox_Backup_Server.png

I now tried to automate the user creation by a script, but had to realize that the CLI does not accept usernames with an underscore.

Code:
root@jane:~# proxmox-backup-manager user create test_2 --password test2
Error: parameter verification errors

parameter 'userid': value does not match the regex pattern

It looks to me that CLI and WebUI do not use the same regex pattern?

Is there any other way to create users with an underscore in their name via the CLI?

Thanks
Philipp
 
Right after hitting the "Post" button, I realized my mistake: The CLI expects the realm, i. e.:
Code:
proxmox-backup-manager user create test_2@pbs --password test2
...which then works!