Regex pattern for username inconsistent CLI vs. WebUI

philippt

Active Member
Nov 21, 2018
12
2
43
74
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!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!