Retrieve admin password

Nextcloud version: 12
Operating system and version (eg, Ubuntu 17.04):

Hello,
I cannot log into my nextcloud as I forgot my admin pw.
I use the nextcloud box and normally access it over wifi.

I remember setting up the email for retrieving the pw but it is not working.
Is there a way I can retrieve or replace it?

Thank you in advance for your help.
Ciao
Lorenzo

It should work with the command line tools occ. https://github.com/nextcloud/nextcloud-snap/wiki/Included-CLI-utilities

If you connect via ssh, it should be something like:

sudo nextcloud.occ user:resetpassword username

Hello tflidd,

Thanks for your response. I haven’t yet had time to try it, but I’ll let you know if I manage.
Thanks.