NextCloud Box reset admin password

When I first power up and got the login screen I put a user ID and password in and logged in successfully.

When I tried to login on another pc on the LAN it gave me the log in screen but said: Wrong password. Reset it. I tried
again same message so I clicked on the Reset it and it gave me: could not send reset email because there is no email address for this username. I had signed off the PC that I had signed onto when I setup the username and password that I had first logged in successfully.

Now I can’t get back in on any system on the LAN always get same error. I have tryed to find out how to reset using browser as there is no keyboard and monitor attached to the NextCloud box and I don’t have a way of doing that.

I was able to download PuTTY.

I can get into the box using PuTTY SSH and I can run commands and see the nextcloud directory but how can I reset or set the password for nextcloud box?

When I use passwd it prompt me for a password but says:
Changing password for ubuntu.

(current)
UNIX password:

passwd: Authentication token
manipulation error

passwd: password unchanged

this is trying to change the password for Ubuntu and not nextcloud box admin.

Any help would be appreciated.
jmartin@jmartinassociates.net

I think this is done on purpose that you have to change the initial password and set your own. After that you can reset the nextcloud password via command line:
sudo nextcloud.occ user:resetpassword username

1 Like

This isn’t working on his box, though it’s fine on mine - no idea why.

Do you need to be in a specific folder? Or does this work system-wide?

Not as far as I can see.

I changed the password for ubuntu and it completed successfully. I tried:
login as: ubuntu
ubuntu@192.168.1.183’s password:
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-1017-raspi2 armv7l)

0 packages can be updated.
0 updates are security updates.

Last login: Mon Aug 29 05:22:22 2016 from 192.168.1.167
ubuntu@ubuntu-standard:~$ sudo nextcloud.occ user:resetpassword jmartin
[sudo] password for ubuntu:
sudo: nextcloud.occ: command not found
ubuntu@ubuntu-standard:~$ ^C
ubuntu@ubuntu-standard:~$ sudo nextcloud.occ user:resetpassword username
sudo: nextcloud.occ: command not found
ubuntu@ubuntu-standard:~$

Looks like the nextcloud.occ if not found?

So I ran ubuntu@ubuntu-standard:~$ ls -altrs /snap/bin
total 24
4 -rwxr-xr-x 1 root root 723 Aug 24 04:05 nextcloud.disable-https
4 -rwxr-xr-x 1 root root 719 Aug 24 04:05 nextcloud.mysql-client
4 -rwxr-xr-x 1 root root 719 Aug 24 04:05 nextcloud.enable-https
4 -rwxr-xr-x 1 root root 683 Aug 24 04:05 nextcloud.occ
4 drwxr-xr-x 2 root root 4096 Aug 24 04:05 .
4 drwxr-xr-x 5 root root 4096 Aug 25 05:22 …

then I ran ubuntu@ubuntu-standard:~$ snap list
Name Version Rev Developer Notes
nextcloud 9.0.53snap2 48 nextcloud -
ubuntu-core 16.04+20160531.12-01 120 canonical -

then I ran ubuntu@ubuntu-standard:~$ uname -a
Linux ubuntu-standard 4.4.0-1017-raspi2 #23-Ubuntu SMP Thu Jun 30 21:50:40 UTC 2016 armv7l armv7l armv7l GNU/Linux

I found post that said this looked normal and to try to add the /snap/bin/ to the command so I run it and this is what I got ubuntu@ubuntu-standard:~$ sudo /snap/bin/nextcloud.occ user:resetpassword jmartin
The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
Enter a new password: bash: /bin/stty: Permission denied
Jmarassoc1
bash: /bin/stty: Permission denied

Confirm the new password: bash: /bin/stty: Permission denied
Jmarassoc1
bash: /bin/stty: Permission denied

I looked at the manual but could not determine what is needed?

any ideal how to fix the problem?

Is this the standard image of the Nextcloud-Box?

@oparoz any ideas?

[Resolved] This is the one preloaded that I ordered from WDLabs and it was working until I lost the admin password. since that time

I was advised by Kyle
Fazzari @github.com to run

$ sudo apt update

$ sudo apt install
snapd snap-confine

snapd is already the
newest version (2.12+0.16.04).

$ sudo snap refresh

$ sudo snap remove
nextcloud && sudo snap install nextcloud

it removed nextcloud
but gave:

error: cannot install
"nextcloud": Get https://search.apps.ubuntu.com/api/v1/snaps/details/nextcloud?confinement=strict:
dial tcp: lookup search.apps.ubuntu.com on 208.76.58.193:53: no such host
I can still get into Snap but nextcloud is gone.

I would give it another go. That seems like a temporary issue.

Now, if after the update occ still doesn’t work correctly, then let me know. I thought it wasn’t possible to change the password of an admin, but maybe this has changed recently.