OCC command to change display-name

I try to change the name displayed for several dozen users, using the occ command (Nextcloud 22 / Docker).
docker exec -u www-data <container_name> php occ user:setting settings display_name=""
The setting does not exist for user “”.
The same command works perfectly with settings email="…".
Can’t this setting be changed?

Nextcloud version (eg, 20.0.5): 22.2.0
Operating system and version (eg, Ubuntu 20.04): Linux 5.10.47-linuxkit x86_64
Apache or nginx version (eg, Apache 2.4.25): nginx 1.21.3
PHP version (eg, 7.4): 8.0.11

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): N

The output of your Nextcloud log in Admin > Logging:


For what is possible:


There are two problems :woozy_face:

there is sometimes a minus and sometimes an underscore between “display” and “name”,
and the parameterization command have a redondant “settings” term !

to add user : –display- name with minus
example : php occ user:add --password-from-env --display-name=“John Doe” --group=“My Group” jdoe

to change for existing user : display_name with underscore
example : php occ user:setting jdoe settings display_name “John Reguil Doe”

Best Regards
Laurent “Reguil” LELLOUCHE