Users not available through UI

I recently migrated to 25.04 from CORE 13-U6 and have one issue I haven’t been able to resolve yet.

When I try to view the users through Credentials-> Users, I get a red stop sign image and a “Can not retrieve response” in the field where the users should be populated.

If I click Show Built-in users, I get the same response. I can add new users, but once they’ve been added I can’t change any of their settings through the UI.

This machine has been in use since FreeNAS 9.2 and migrated through a bunch of different jail and app configurations, so I’m figuring that I probably have some user that’s either in conflict with an existing user or missing/corrupted data for a user.

I used the CLI to access the account namespace and try to get information about what was there and/or missing but got this response from a query command:

[truenas] account user> query
Error: 3 validation errors for UserQueryResult
result.list[UserQueryResultItem].20.email
value is not a valid email address: The part after the @-sign is a special-use or reserved name that cannot be used with email. [type=value_error, input_value=‘apps@freenas.local’, input_type=str]
result.UserQueryResultItem
Input should be a valid dictionary or instance of UserQueryResultItem [type=model_type, input_value=[{‘id’: 1, ‘uid’: 0, ‘use…DMIN’], ‘api_keys’: }], input_type=list]
For further information visit Redirecting...
result.int
Input should be a valid integer [type=int_type, input_value=[{‘id’: 1, ‘uid’: 0, ‘use…DMIN’], ‘api_keys’: }], input_type=list]
For further information visit Redirecting...

This looks like there’s an issue with an e-mail address for at least one of my accounts, but I am not sure which account (probably the apps account, but not sure what number) and even if I knew which account, I’m not 100% sure what the best way to resolve the issue is.

I’m leaning towards removing all the prior accounts I had setup previously and just use the new standards with UID/GIDs starting in the 3000s. Can anyone point me in the right direction for how to find/remove these old non-standard accounts and leave myself with just the new users/groups I’ve created since 25.04 and obviously the default built-in accounts?

You may have better luck identifying the troublesome account if you run midclt call user.query at the shell. If it returns a mess of JSON, you can pretty it up by piping it through jq: midclt call user.query | jq.

Edit: You can probably find the affected user even more directly by running midclt call user.query | grep "apps@freenas" | jq. Once you get the id value for that user, I think the correct command to clear out the faulty email would be midclt call user.update { "id": (the number), "email": ""}.

Thank you very much for the quick response, unfortunately it looks like largely the same information to me as from the account namespace although it does give a traceback stack.

root@truenas[/]# midclt call user.query | grep "apps@freenas" | jq
3 validation errors for UserQueryResult
result.list[UserQueryResultItem].20.email
  value is not a valid email address: The part after the @-sign is a special-use or reserved name that cannot be used with email. [type=value_error, input_value='apps@freenas.local', input_type=str]
result.UserQueryResultItem
  Input should be a valid dictionary or instance of UserQueryResultItem [type=model_type, input_value=[{'id': 1, 'uid': 0, 'use...DMIN'], 'api_keys': []}], input_type=list]
    For further information visit https://errors.pydantic.dev/2.9/v/model_type
result.int
  Input should be a valid integer [type=int_type, input_value=[{'id': 1, 'uid': 0, 'use...DMIN'], 'api_keys': []}], input_type=list]
    For further information visit https://errors.pydantic.dev/2.9/v/int_type
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/api/base/server/ws_handler/rpc.py", line 323, in process_method_call
    result = await method.call(app, params)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py", line 49, in call
    return await self._dump_result(app, methodobj, result)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/api/base/server/method.py", line 52, in _dump_result
    return self.middleware.dump_result(self.serviceobj, methodobj, app, result)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 791, in dump_result
    return serialize_result(new_style_returns_model, result, expose_secrets)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/api/base/handler/result.py", line 13, in serialize_result
    return model(result=result).model_dump(
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/pydantic/main.py", line 212, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 3 validation errors for UserQueryResult
result.list[UserQueryResultItem].20.email
  value is not a valid email address: The part after the @-sign is a special-use or reserved name that cannot be used with email. [type=value_error, input_value='apps@freenas.local', input_type=str]
result.UserQueryResultItem
  Input should be a valid dictionary or instance of UserQueryResultItem [type=model_type, input_value=[{'id': 1, 'uid': 0, 'use...DMIN'], 'api_keys': []}], input_type=list]
    For further information visit https://errors.pydantic.dev/2.9/v/model_type
result.int
  Input should be a valid integer [type=int_type, input_value=[{'id': 1, 'uid': 0, 'use...DMIN'], 'api_keys': []}], input_type=list]
    For further information visit https://errors.pydantic.dev/2.9/v/int_type

I made a new backup just in case and started doing a little bit more destructive testing and was ultimately able to resolve the issue, posting here for anyone else who may find themselves in a similar situation.

While I couldn’t pull up the Users information, I could get the list of groups, but I was not able to retrieve any of the members for the groups I could see.

I went through and started deleting the groups that I had created in previous versions of Free/TrueNAS and ticking the box to delete the users that were members of those groups as well. Once I got through enough of the groups to remove the troublesome account, the Users tab started working again and I could get the group member lists for the remaining 2 groups I had that hadn’t been deleted yet.

If any TrueNAS gurus or someone from iX happens across this post before it falls off into oblivion, I’d be interested in other potential solutions or even a way to just get a list of all the existing UIDs when the UI and CLI query command isn’t working. If I could have gotten a list I could have at least worked through them one at a time until I found the specific account that was causing the issue and just removed that one potentially.