# Can't login to nextcloud any more

**URL:** <https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372>\
**Category:** Existing Apps\
**Tags:** nextcloud\
**Created:** [22 August 2023 07:14 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372 "2023-08-22T07:14:24Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/peter/32/57_2.png) [@peter](https://syncloud.discourse.group/u/peter)\
**Post date:** [22 August 2023 07:14 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/1 "2023-08-22T07:14:24Z")

</div>

Hi I’ve changed my user password on syncloud and now I can’t login to Nextcloud any more. It also says that there have been too many login requests from my site (after I tried to login for some times)  
All information I found on the internet to reset the brute force protection does not work (can’t reset password via occ, can’t access databases, …)

Changing password via occ does also not work ☹

```auto
root@odroid-xu3and4:~# snap run nextcloud.occ user:resetpassword admin
Enter a new password: 
Confirm the new password: 
Error while resetting password!

```

Can you help?  
peter

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/peter/32/57_2.png) [@peter](https://syncloud.discourse.group/u/peter)\
**Post date:** [22 August 2023 09:58 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/2 "2023-08-22T09:58:31Z")

</div>

Resetting brute-force-protection with

```auto
snap run nextcloud.occ security:bruteforce:reset 192.168.1.100

```

did work… but I can’t change the password and can’t login. The user is listed with

```auto
snap run nextcloud.occ user:info admin

```

But

```auto
snap run nextcloud.occ group:list

```

does not show the user in the admin group

**Problem seems to be solved now**  
I reinstalled nextcloud with

```auto
snap remove nextcloud
snap install nextcloud

```

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [22 August 2023 11:28 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/3 "2023-08-22T11:28:44Z")

</div>

> [@peter](#):
>
> Changing password via occ does also not work

Yes this does not work as Nextcloud as all other apps are storing user credentials in LDAP database (Users app).

> ```auto
> snap run nextcloud.occ security:bruteforce:reset 192.168.1.100
> 
> ```

Probably it would work if it was done first, I guess occ reset password broke it

Did you change password because it was too many login requests or it was too many requests after you changed the password?

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/peter/32/57_2.png) [@peter](https://syncloud.discourse.group/u/peter)\
**Post date:** [22 August 2023 11:43 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/4 "2023-08-22T11:43:36Z")

</div>

I changed the password in the user-App because I was afraid of an activation request my syncloud-device showed me (was afraid of an password attack - in combination with this email that my 30-day trial period expires). So I did a complete activation process and had to enter a (new?) password. Afterwards I changed the main password on the device and also the root account (to get a better security-feeling)

Thanks for your reply! Regards  
Peter

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/peter/32/57_2.png) [@peter](https://syncloud.discourse.group/u/peter)\
**Post date:** [22 August 2023 12:39 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/5 "2023-08-22T12:39:08Z")

</div>

Problem is not solved yet ☹  
The other users (like backup) do not exist after I reinstalled nextcloud. And the user seems not to be admin any more (I can’t configure nextcloud - e.g. contacts).  
I tried:

```auto
snap run nextcloud.occ files:scan --all

```

but I get an error:

```auto
An unhandled exception has been thrown:
TypeError: OC\Files\Cache\Scanner::scanChildren(): Argument #6 ($oldSize) must be of type int, float given, called in /snap/nextcloud/711/nextcloud/lib/private/Files/Cache/Scanner.php on line 347 and defined in /snap/nextcloud/711/nextcloud/lib/private/Files/Cache/Scanner.php:391
Stack trace: [...]

```

Any idea what I can do?

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [23 August 2023 10:48 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/6 "2023-08-23T10:48:28Z")

</div>

What kind of device do you have? arm32 or not?

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/peter/32/57_2.png) [@peter](https://syncloud.discourse.group/u/peter)\
**Post date:** [23 August 2023 16:29 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/7 "2023-08-23T16:29:34Z")

</div>

Hi Boris,  
it’s an arm32 (armv7l)  
Regards  
Peter

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [23 August 2023 16:55 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/8 "2023-08-23T16:55:26Z")

</div>

Ok, looks like the last Nextcloud version supported on arm32 was 26, so I will have to revert arm32 to 26.

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/peter/32/57_2.png) [@peter](https://syncloud.discourse.group/u/peter)\
**Post date:** [23 August 2023 17:06 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/9 "2023-08-23T17:06:39Z")

</div>

Sounds like a plan - what can I do / what do I have to do?

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [23 August 2023 17:17 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/10 "2023-08-23T17:17:20Z")

</div>

just reverted the version, but Nextcloud does not support downgrading so you have to remove it and install again.  
Hopefully that will help to index your files if that worked before.

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/peter/32/57_2.png) [@peter](https://syncloud.discourse.group/u/peter)\
**Post date:** [24 August 2023 14:53 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/11 "2023-08-24T14:53:40Z")

</div>

Hi Boris - I did reinstall nextcloud to 706 - that worked, but I have only one user in nextcloud and it is not an admin user (I can’t add apps or users in nextcloud)  
My old nextcloud users existed only in nextcloud (did I miss to make a backup before reinstalling?)  
But what is still weird, is that I can not add users or add ons

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [24 August 2023 15:52 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/12 "2023-08-24T15:52:53Z")

</div>

OK, I am not sure why but very rarely it happens, usually after upgrades, ldap group mapping is really strange in Nextcloud.

Can you run these commands and show the out put?

Check

```auto
snap run nextcloud.psql -c "select * from oc_ldap_group_mapping"

snap run nextcloud.psql -c "select * from oc_ldap_group_members"

```

Show groups:

```auto
snap run nextcloud.occ group:list

```

Make all admins

```auto
snap run nextcloud.psql -c "update oc_ldap_group_mapping set owncloud_name = 'admin'"

snap run nextcloud.psql -c "update oc_ldap_group_members set owncloudname = 'admin'"

```

from here: [Nextcloud · syncloud/platform Wiki · GitHub](https://github.com/syncloud/platform/wiki/Nextcloud#fix-admin-rights)

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/peter/32/57_2.png) [@peter](https://syncloud.discourse.group/u/peter)\
**Post date:** [24 August 2023 20:22 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/13 "2023-08-24T20:22:01Z")

</div>

Sure:

```auto
snap run nextcloud.psql -c "select * from oc_ldap_group_mapping"
 owncloud_name | ldap_dn | directory_uuid | ldap_dn_hash                           
---------------+------------------------------------------+--------------------------------------+------------------------------------------------------------------
 admin | cn=syncloud,ou=groups,dc=syncloud,dc=org | c29aa6c4-d501-103d-9627-378f776f14c1 | aac22646179b2b187a05c325be3431b95e39ef12a19def4ad4ea2e3aa0dc5123
(1 row)
snap run nextcloud.psql -c "select * from oc_ldap_group_members"
 owncloudname | owncloudusers      
--------------+------------------------
 admin | a:1:{i:0;s:5:"peter";}

snap run nextcloud.occ group:list
  - admin:
    - peter

The last two commands answered UPDATE 1

```

After this I logged in to nextcloud and still have no admin privileges, although every table seems to be “all right”

 ![image](https://global.discourse-cdn.com/free1/uploads/syncloud/original/1X/92ec759c25bb1f5f8c3d4aa124198a6f7b9a820c.png)  
I hope I gave every information needed

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [27 August 2023 09:17 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/14 "2023-08-27T09:17:07Z")

</div>

Is `peter` the user device was activated with or later created in Syncloud Users app?

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [27 August 2023 10:02 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/15 "2023-08-27T10:02:57Z")

</div>

Can you run this:

```auto
snap run nextcloud.occ user:info peter

```

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [27 August 2023 10:05 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/16 "2023-08-27T10:05:55Z")

</div>

Did you create any group or user inside nextcloud (not using Syncloud Users app) after the install?  
Also try removing nextcloud and installing fresh to see if that changes anything.

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/peter/32/57_2.png) [@peter](https://syncloud.discourse.group/u/peter)\
**Post date:** [27 August 2023 10:58 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/17 "2023-08-27T10:58:09Z")

</div>

Hi Boris,  
peter is the main user of the Syncloud device, the first I installed and the only one I managed with the Users-App. All the other users have been created in Nextcloud (e.g. a backup user or family members).  
So I think my problem with these additional users is: I did not make a backup ☹ (am I right?!)  
Is there a better way to remove and install nextcloud as via

```auto
snap remove nextcloud
snap install nextcloud

```

That was what I did at least twice already, but I can do it again. I even did it this way for downgrading (as you recommended)

The command user:info produced the following output:

```auto
  - user_id: peter
  - display_name: peter
  - email: ***********
  - cloud_id: peter@http://localhost
  - enabled: true
  - groups:
  - quota: none
  - storage:
    - free: 729513984
    - used: 19944789256
    - total: 20674303240
    - relative: 96.47
    - quota: -3
  - last_seen: 2023-08-27T10:53:43+00:00
  - user_directory: /opt/disk/internal/nextcloud/peter
  - backend: LDAP

```

Thanks für you support!  
Peter

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [27 August 2023 11:23 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/18 "2023-08-27T11:23:03Z")

</div>

Ok, this user has no admin group still.  
Yes, can you run this:

```auto
snap run nextcloud.occ group:adduser admin peter

```

Then again this:

```auto
snap run nextcloud.occ user:info peter

```

---

<div class="post-metadata">

**Author:** ![peter](https://yyz2.discourse-cdn.com/free1/user_avatar/syncloud.discourse.group/peter/32/57_2.png) [@peter](https://syncloud.discourse.group/u/peter)\
**Post date:** [27 August 2023 11:39 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/19 "2023-08-27T11:39:00Z")

</div>

done:

```auto
root@odroid-xu3and4:~# snap run nextcloud.occ group:adduser admin peter
root@odroid-xu3and4:~# snap run nextcloud.occ user:info peter  
  - user_id: peter
  - display_name: peter
  - email: ******
  - cloud_id: peter@http://localhost
  - enabled: true
  - groups:
  - quota: none
  - storage:
    - free: 729346048
    - used: 19944789256
    - total: 20674135304
    - relative: 96.47
    - quota: -3
  - last_seen: 2023-08-27T11:37:19+00:00
  - user_directory: /opt/disk/internal/nextcloud/peter
  - backend: LDAP

```

---

<div class="post-metadata">

**Author:** ![boris](https://avatars.discourse-cdn.com/v4/letter/b/74df32/32.png) [@boris](https://syncloud.discourse.group/u/boris)\
**Post date:** [27 August 2023 12:09 UTC](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372/20 "2023-08-27T12:09:06Z")

</div>

Something is wrong 🙂

Can you try:

1. Reinstall and check by running the command and also logging into the UI.
2. If that does not help try re-activating the device to the same domain (Settings - Activation) and then reinstalling nextcloud. That will reset syncloud users (ldap).

[Next page](https://syncloud.discourse.group/t/cant-login-to-nextcloud-any-more/372.md?page=2)
