Hello,
PHP 8.1.2-1ubuntu2.17 (cli)
Ubuntu - 22.04
I am having issues to reset user accounts password.
sudo -u www-data php /var/www/nextcloud/occ user:resetpassword admin
I have tried above command as can not find location for /var/www
i had no php so installed above version
need help to reset one user password.
I have 2 user one is logged in on phone app but dont know password so canāt use that to reset password from dashboard
i never setup email to reset password from linkā¦
So only option I suspect is from command line
I have tried below command also but then error for occ folder.
php occ user:resetpassword admin
Could not open input file: occ
could someone please help to rest password.
thanks in advance!
Amrit
How do you run Nextcloud if no PHP was installed?
It sounds to me you are not on the server Nextcloud is running or you are using Nextcloud with Docker, Snap or something else. If you are using Docker, for example, the way you call the CLI tool is different or you have to go into the container first. An example for Docker is documented here:
https://hub.docker.com/_/nextcloud
docker exec --user www-data CONTAINER_ID php occ
3 Likes
ernolf
June 10, 2024, 7:17am
3
You must pass occ
with the complete path as the user that runs Nextcloud, which is www-data
on Ubuntu. So if your Nextcloud is installed in /var/www/nextcloud
, the occ call must be done like this:
sudo -u www-data php -f /var/www/nextcloud/occ user:resetpassword admin
This is all described ā here ā in the manual.
Much and good luck,
ernolf
1 Like
Thanks Ernolf for reply.
Even to test I run
sudo -u www-data php occ
Could not open input file: occ
I install Next cloud on Ubuntu 22.04 version
as i mentioned I was not able to Run php commands then i downloaded app. how i can install occ?
i dont have www folder under /var
thanks
ernolf
June 11, 2024, 6:20am
5
asingh22_1:
how i can install occ
occ is part of nextcloud server.
Let me repeat the question that @mritzmann asked:
mritzmann:
How do you run Nextcloud if no PHP was installed?
It sounds to me you are not on the server Nextcloud is running or you are using Nextcloud with Docker, Snap or something else.
ernolf
Interestingā¦!
I downloaded Ubuntu 22.04.4 server and install Nextcloud a part of it during initial installation.
so wondering if i had to install PHP do or can I install occ also to execute command to reset password.
Thanks
Thanks
ernolf
June 11, 2024, 6:49am
7
OK, then you have Nextcloud as a Snap. Thatās a different case. Iām not a Snap specialist.
Maybe someone with Snap experience can answer.
Much and good luck,
ernolf
1 Like
ernolf:
have Nextcloud as a Snap
Hi Mritzmann
as I replied and found out from Ernolf I Nextcloud as snap.
is there way to reset user account password ?
Thanks
Thank you so much this worked like charm!
Cheers
Amrit
1 Like