Reason for minimum (4) username length?

KB19

Active Member
Apr 17, 2020
36
4
28
Vienna
Currently it's not possible to create a new PBS user with a very short username:
GUI: The minimum length for this field is 4
CLI: value does not match the regex pattern
This restriction doesn't exist at PVE, I'm just curious: Is there a (technical) reason for this restriction? :)

A short statement from a developer would be highly appreciated.

It's possible to manually change the username afterwards in both config files (shadow.json & user.cfg) but I'm unable to evaluate the side effects of such a change. Edit: Don't try this, there are various other length checks (≥8) for user@pbs arguments in place! :D
 
Last edited:
I don't think there was any particular reason other than "seems like a sensible limit to avoid confusing user ids" ;)
 
  • Like
Reactions: Johannes S and KB19
Actually I _can_ create a user with three characters in PBS (PBS 3.2-7)
Unfortunately we did that for all our Backup-Admins (even the proxmox server login) .....
This is really unfortunate, as we cannot change the owner of a restored VM (from tape) (which belongs to root-pam at the moment) to the PVE User (named "bak"at"pam" :- ) ) in the web-interface.. We get " "the minimum lenght for this field is 8""
(Well I can do it on the command line, I guess.)

I would say this is a small bug....
 
Last edited: