OPNsense Forum

English Forums => 25.1, 25.4 Series => Topic started by: MrHappyHippo on September 27, 2025, 07:37:22 PM

Title: Error Adding OTP to User Account: 'The name of the root user cannot be changed'
Post by: MrHappyHippo on September 27, 2025, 07:37:22 PM
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.
Title: Re: Error Adding OTP to User Account: 'The name of the root user cannot be changed'
Post by: Monviech (Cedrik) on September 27, 2025, 07:41:03 PM
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
Title: Re: Error Adding OTP to User Account: 'The name of the root user cannot be changed'
Post by: MrHappyHippo on September 27, 2025, 07:44:36 PM
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.
Title: Re: Error Adding OTP to User Account: 'The name of the root user cannot be changed'
Post by: MrHappyHippo on September 27, 2025, 08:12:41 PM
I've created a github bug issue it can be found here: https://github.com/opnsense/core/issues/9246
Title: Re: Error Adding OTP to User Account: 'The name of the root user cannot be changed'
Post by: MrHappyHippo on September 27, 2025, 09:02:57 PM
also my root user name is not root i was able to modify the username when setting up my system
Title: Re: Error Adding OTP to User Account: 'The name of the root user cannot be changed'
Post by: franco on September 29, 2025, 02:29:14 PM
> 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