When attempting to enable OTP for my administrator account, I received an error indicating that the username cannot be changed, even though I didn't modify it only attempted to add OTP.
If you think there is an issue best open one on github.
https://github.com/opnsense/core/issues
That constraint for the root user is quite recent:
https://github.com/opnsense/core/issues/9064
I'm not very familiar with the codebase, but I don't see why adding OTP or other non-critical information to a user account should be restricted, especially when the username or other core fields aren't being altered. I understand that the root username itself should not be changed or deleted, but I believe users should still be able to modify other fields (like enabling OTP) without issues.
I've created a github bug issue it can be found here: https://github.com/opnsense/core/issues/9246
also my root user name is not root i was able to modify the username when setting up my system
> That constraint for the root user is quite recent:
Not counting the bug that was introduced while converting user/groups to MVC/API. ;)
Cheers,
Franco