Can't login as Nextcloud administrator - how can this be fixed?

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 1.56
  • Operating system and version (e.g., Ubuntu 24.04):
    • Bookworm
  • Web server and version (e.g, Apache 2.4.25):
    • 2.4.66 (Debian)
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • replace me
  • PHP version (e.g, 8.3):
    • PHP 8.3.12
  • Is this the first time you’ve seen this error? (Yes / No):
    • yes
  • When did this problem seem to first start?
    • after i changed admin passwd
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • RPi 4 prebuilt install
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

can’t login as nextcloud administrator via web interface

Steps to replicate it (hint: details matter!):

  1. I installed Nextcloud on a RPI4 using the prebuilt NextcloudPi_RaspberryPi4 V1.56. I created a web redirect from noip, with the ip name ‘mycloud.point2this.com’, and ensured that port forwarding rules for 80 and 433 went to my Raspberry Pi at 192.168.1.10. I created a user, ‘test@gmail.com’ username test. Using both the web interface and the windows desktop client I could transfer files back and forth from a pc to nextcloud. Sofar, so good. A few weeks went by and I forgot my nextcloud admin name and password. In an attempt to retrieve it with the help of chatgpt, I edited the cmdline.txt on the SD card and was able to boot to a root shell. Using occ, II was able to see the users: gggNextcloudAdmin, test, and ncp. I then reset the password for gggNextcloudAdmin. I returned the cmdline file on the SD card to its original state, Rebooted the system and when I directly connected to the Pi, I could login using gggNextcloudAdmin, and the new password. I could also ssh into the pi and login with gggNextcloudAdmin and the new password. Now, when I use a web browser and go to nextcloud.me.com or the local IP address and try to login with gggNextcloudAdmin and the password, it won’t accept it. I think it should-right? If so, how can I fix this? I want to be able to access the admin screens in Nextcloud.

Web Browser

Tried above with Firefox and Edge, both are the current versions.

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

jjhNextcloudAdmin@nextcloudpi:~$ sudo -u www-data php /var/www/nextcloud/occ config:list
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "1": "192.168.1.253",
            "2": "nextcloudpi.local",
            "3": "mycloud.point2this.com",
            "11": "2600:4041:37b:5600:b1b0:e698:8596:392c",
            "5": "mycloud.point2this.com",
            "6": "108.17.125.29",
            "14": "nextcloudpi"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.1.2",
        "overwrite.cli.url": "https:\/\/mycloud.point2this.com\/",
        "overwritehost": "mycloud.point2this.com",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "tempdirectory": "\/opt\/ncdata\/data\/tmp",
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "maintenance": false,
        "logfile": "\/opt\/ncdata\/data\/nextcloud.log",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***"
    },
    "apps": {
        "activity": {
            "enabled": "yes",
            "installed_version": "3.0.0",
            "types": "filesystem"
        },
        "app_api": {
            "enabled": "yes",
            "installed_version": "4.0.0",
            "types": ""
        },
        "backgroundjob": {
            "lastjob": "106"
        },
        "bruteforcesettings": {
            "enabled": "yes",
            "installed_version": "3.0.0",
            "types": ""
        },
        "calendar": {
            "enabled": "yes",
            "installed_version": "5.0.1",
            "types": ""
        },
        "circles": {
            "enabled": "yes",
            "installed_version": "30.0.0-dev",
            "loopback_tmp_path": "\/",
            "loopback_tmp_scheme": "https",
            "maintenance_run": "0",
            "maintenance_update": "{\"3\":1770070502,\"2\":1770072602,\"1\":1770072602}",
            "migration_22": "1",
            "migration_run": "0",
            "types": "filesystem,dav"
        },
        "cloud_federation_api": {
            "enabled": "yes",
            "installed_version": "1.13.0",
            "types": "filesystem"
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "1.20.1",
            "types": "logging"
        },
        "contacts": {
            "enabled": "yes",
            "installed_version": "6.1.0",
            "types": "dav"
        },
        "contactsinteraction": {
            "enabled": "yes",
            "installed_version": "1.11.0",
            "types": "dav"
        },
        "core": {
            "backgroundjobs_mode": "cron",
            "installedat": "1731099245.0198",
            "lastcron": 1770072603,
            "lastupdatedat": 1731099245,
            "metadataGenerationDone": true,
            "moveavatarsdone": "yes",
            "previewsCleanedUp": "1",
            "public_files": "files_sharing\/public.php",
            "vendor": "nextcloud",
            "files_metadata": {
                "photos-original_date_time": {
                    "value": null,
                    "type": "int",
                    "etag": "",
                    "indexed": true,
                    "editPermission": 0
                },
                "photos-exif": {
                    "value": null,
                    "type": "array",
                    "etag": "",
                    "indexed": false,
                    "editPermission": 0
                },
                "photos-ifd0": {
                    "value": null,
                    "type": "array",
                    "etag": "",
                    "indexed": false,
                    "editPermission": 0
                },
                "photos-size": {
                    "value": null,
                    "type": "array",
                    "etag": "",
                    "indexed": false,
                    "editPermission": 0
                },
                "blurhash": {
                    "value": null,
                    "type": "string",
                    "etag": "00470f8a8587fda0d5e4c97e12d7a728",
                    "indexed": false,
                    "editPermission": 0
                },
                "photos-gps": {
                    "value": null,
                    "type": "array",
                    "etag": "",
                    "indexed": false,
                    "editPermission": 0
                }
            },
            "oc.integritycheck.checker": []
        },
        "dashboard": {
            "enabled": "yes",
            "installed_version": "7.10.0",
            "types": ""
        },
        "dav": {
            "buildCalendarReminderIndex": "yes",
            "buildCalendarSearchIndex": "yes",
            "enabled": "yes",
            "installed_version": "1.31.1",
            "regeneratedBirthdayCalendarsForYearFix": "yes",
            "types": "filesystem"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "1.20.0",
            "types": ""
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "1.20.0",
            "types": "authentication"
        },
        "files": {
            "enabled": "yes",
            "installed_version": "2.2.0",
            "mimetype_version": "30.0.1.2",
            "types": "filesystem"
        },
        "files_downloadlimit": {
            "enabled": "yes",
            "installed_version": "3.0.0",
            "types": ""
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "3.0.0",
            "types": ""
        },
        "files_reminders": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "1.22.0",
            "types": "filesystem"
        },
        "files_trashbin": {
            "enabled": "yes",
            "installed_version": "1.20.1",
            "types": "filesystem,dav"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.23.0",
            "types": "filesystem,dav"
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "3.0.0",
            "types": "logging"
        },
        "logreader": {
            "enabled": "yes",
            "installed_version": "3.0.0",
            "types": "logging"
        },
        "lookup_server_connector": {
            "enabled": "yes",
            "installed_version": "1.18.0",
            "types": "authentication"
        },
        "nextcloud_announcements": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200",
            "types": "logging"
        },
        "nextcloudpi": {
            "enabled": "yes",
            "installed_version": "0.0.2",
            "types": ""
        },
        "notes": {
            "enabled": "yes",
            "installed_version": "4.11.0",
            "types": ""
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "3.0.0",
            "types": "logging"
        },
        "notify_push": {
            "base_endpoint": "https:\/\/mycloud.point2this.com\/push",
            "cookie": "***REMOVED SENSITIVE VALUE***",
            "enabled": "yes",
            "installed_version": "0.7.0",
            "types": "filesystem"
        },
        "oauth2": {
            "enabled": "yes",
            "installed_version": "1.18.1",
            "types": "authentication"
        },
        "password_policy": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "types": "authentication"
        },
        "photos": {
            "enabled": "yes",
            "installed_version": "3.0.2",
            "lastPlaceMappedUser": "ncp",
            "lastPlaceMappingDone": "true",
            "types": "dav,authentication"
        },
        "preview": {
            "jpeg_quality": "60"
        },
        "previewgenerator": {
            "enabled": "yes",
            "heightSizes": "256",
            "installed_version": "99.99.99",
            "squareSizes": "32 256",
            "types": "filesystem",
            "widthSizes": "256 384"
        },
        "privacy": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "types": ""
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "1.20.0",
            "types": "prevent_group_restriction"
        },
        "recommendations": {
            "enabled": "yes",
            "installed_version": "3.0.0",
            "types": ""
        },
        "related_resources": {
            "enabled": "yes",
            "installed_version": "1.5.0",
            "types": ""
        },
        "serverinfo": {
            "cached_count_filecache": "1904",
            "cached_count_storages": "6",
            "enabled": "yes",
            "installed_version": "2.0.0",
            "types": ""
        },
        "settings": {
            "enabled": "yes",
            "installed_version": "1.13.0",
            "types": ""
        },
        "sharebymail": {
            "enabled": "yes",
            "installed_version": "1.20.0",
            "types": "filesystem"
        },
        "support": {
            "SwitchUpdaterServerHasRun": "yes",
            "enabled": "yes",
            "installed_version": "2.0.0",
            "types": "session"
        },
        "survey_client": {
            "enabled": "yes",
            "installed_version": "2.0.0",
            "types": ""
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "1.20.0",
            "types": "logging"
        },
        "tasks": {
            "enabled": "yes",
            "installed_version": "0.16.1",
            "types": ""
        },
        "text": {
            "enabled": "yes",
            "installed_version": "4.1.0",
            "types": "dav"
        },
        "theming": {
            "backgroundMime": "image\/png",
            "enabled": "yes",
            "installed_version": "2.5.0",
            "logoDimensions": "500x500",
            "logoMime": "image\/svg+xml",
            "name": "NextCloudPi",
            "slogan": "***REMOVED SENSITIVE VALUE***",
            "types": "logging",
            "url": "***REMOVED SENSITIVE VALUE***"
        },
        "twofactor_backupcodes": {
            "enabled": "yes",
            "installed_version": "1.19.0",
            "types": ""
        },
        "updatenotification": {
            "enabled": "no",
            "installed_version": "1.20.0",
            "types": ""
        },
        "user_status": {
            "enabled": "yes",
            "installed_version": "1.10.0",
            "types": ""
        },
        "viewer": {
            "enabled": "yes",
            "installed_version": "3.0.0",
            "types": ""
        },
        "weather_status": {
            "enabled": "yes",
            "installed_version": "1.10.0",
            "types": ""
        },
        "webhook_listeners": {
            "enabled": "yes",
            "installed_version": "1.1.0-dev",
            "types": "filesystem"
        },
        "workflowengine": {
            "enabled": "yes",
            "installed_version": "2.12.0",
            "types": "filesystem"
        }
    }
}

Apps

The output of occ app:list (if possible).

ncp is the default admin account, maybe you find some credentials in browser caches/password vaults.
It works as expected, you loose your credentials - you loose your access. If you did configure your ncp account right in the beginning you may set back password as offered on login page.
If you used your ncp instance mainly for file management it should not be too hard to setup a new instance.

I forgot about ncp. That is the level of admin functionality I am trying to find. During the install, I did set it up correctly. I sifted through my browser cache and found the ncp login web access and credentials. That solved the issue. How stupid of me. Sorry to take up all this bandwidth.

Thank you. Case closed

1 Like