Unable to access occ to enable admin user

pi@nextcloudpi:~ $ sudo -u www-data php occ user:enable ncp
Could not open input file: occ

I tried this because I read that it was suppose to enable back my user admin because I reenter my password tree time.

I’m able to access nextcloudpi but not nextcloud admin user.

Try:

sudo nextcloud.occ user:enable admin_user

Where admin_user is your named admin account that is disabled.

sudo: nextcloud.occ : commande introuvable (command not found)

Maybe try:

sudo -u www-data php /var/www/nextcloud/occ user:enable ncp

You need the path to the file as above. Either be IN the same directory as the occ file ("~" means you’re in the user’s home directory, not the nextcloud root), or specify the full path to it.

sorry I scrapt everything it’s my fault. I click the boutton to update everything because I was missing php files. But I have 2 active user. how can I backup from linux all user data like photo, doc, pdf etc …

Ho! I was asking this question because he want to reinstall everything