How to create an administrator account from the terminal

I need a way to create a user with command line administrator permissions.
we have problems with the ldap server that cause an Internal server error every time an ldap user logs in (includes admin). now, as we try to restore the ldap. I need to create an admin account from the terminal since I cannot access the web page

Hi @Tiziano_Pedrazzoli, see this for command-line interface of nextcloud : Using the occ command — Nextcloud latest Administration Manual latest documentation

To create a user : Using the occ command — Nextcloud latest Administration Manual latest documentation

1 Like

thank you very much, very helpful.
let me ask another question, is it possible to convert an ldap user to a regular user?
in case the ldap server does not return operational there is the risk of losing all personal files

@Tiziano_Pedrazzoli sorry i can’t help you for this , I have never used LDAP…