Application password does not work any more/expired/get broken
Steps to reproduce
- Create Application password via .../index.php/settings/user/security
- Use it with e.g. cacti Poller https://github.com/GAS85/cacti_scripts/blob/master/nextcloud_api_poller.sh
- See that after year(s) password is still present in configuration
, but API answers with an error
<?xml version="1.0"?>
<ocs>
<meta>
<status>failure</status>
<statuscode>997</statuscode>
<message>Current user is not logged in</message>
</meta>
<data/>
</ocs>
- Need to create new password
Expected behaviour
Application password should not expire, or get broken.
Actual behaviour
Could not use old Application password, even it is listed in a config and was last time accessed 5 Days ago (no updates at this time were performed):

Server configuration
Operating system: Ubuntu 18.04
Web server: Apache2 2.4.41
Database: 10.1.44-MariaDB
PHP version: 7.3.14
Nextcloud version: 17.0.3
Updated from an older Nextcloud/ownCloud or fresh install: Update
Where did you install Nextcloud from: Official
Signing status:
Signing status
No errors have been found.
List of activated apps:
App list
Enabled:
- accessibility: 1.3.0
- activity: 2.10.1
- admin_audit: 1.7.0
- audioplayer: 2.9.0
- bruteforcesettings: 1.5.0
- calendar: 2.0.1
- checksum: 0.4.4
- cloud_federation_api: 1.0.0
- comments: 1.7.0
- data_request: 1.4.0
- dav: 1.13.0
- deck: 0.8.0
- federatedfilesharing: 1.7.0
- federation: 1.7.0
- files: 1.12.0
- files_automatedtagging: 1.7.0
- files_external: 1.8.0
- files_pdfviewer: 1.6.0
- files_retention: 1.6.0
- files_rightclick: 0.15.1
- files_sharing: 1.9.0
- files_trashbin: 1.7.0
- files_versions: 1.10.0
- files_videoplayer: 1.6.0
- firstrunwizard: 2.6.0
- flowupload: 0.1.8
- gallery: 18.4.0
- gpxpod: 4.1.1
- keeweb: 0.6.1
- logreader: 2.2.0
- lookup_server_connector: 1.5.0
- mail: 1.1.2
- maps: 0.1.4
- nextcloud_announcements: 1.6.0
- notes: 3.1.4
- notifications: 2.5.0
- oauth2: 1.5.0
- ocdownloader: 1.7.5
- password_policy: 1.7.0
- phonetrack: 0.6.1
- polls: 1.1.6
- previewgenerator: 2.2.0
- privacy: 1.1.0
- provisioning_api: 1.7.0
- radio: 0.6.5
- recommendations: 0.5.0
- serverinfo: 1.7.0
- sharebymail: 1.7.0
- survey_client: 1.5.0
- systemtags: 1.7.0
- text: 1.1.1
- theming: 1.8.0
- twofactor_backupcodes: 1.6.0
- twofactor_totp: 4.1.2
- unsplash: 1.1.5
- updatenotification: 1.7.0
- viewer: 1.2.0
- weather: 1.6.4
- workflowengine: 1.7.0
Disabled:
- encryption
- impersonate
- sharerenamer
- support
- user_ldap
Nextcloud configuration:
Config report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": {
"0": "***REMOVED SENSITIVE VALUE***",
"2": "***REMOVED SENSITIVE VALUE***"
},
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "17.0.3.1",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"filesystem_check_changes": 0,
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.locking": "\\OC\\Memcache\\Redis",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"timeout": 1.5
},
"mail_smtpmode": "smtp",
"mail_smtpauthtype": "LOGIN",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"maintenance": false,
"theme": "",
"logfile": "\/var\/nextcloud\/data\/nextcloud.log",
"loglevel": 1,
"trashbin_retention_obligation": "14, auto",
"versions_retention_obligation": "14, auto",
"data-fingerprint": "***REMOVED SENSITIVE VALUE***",
"enable_previews": true,
"enabledPreviewProviders": [
"OC\\Preview\\PNG",
"OC\\Preview\\JPEG",
"OC\\Preview\\GIF",
"OC\\Preview\\BMP",
"OC\\Preview\\XBitmap",
"OC\\Preview\\Movie",
"OC\\Preview\\PDF",
"OC\\Preview\\MP3",
"OC\\Preview\\TXT",
"OC\\Preview\\MarkDown"
],
"preview_max_x": 1080,
"preview_max_y": 1920,
"auth.bruteforce.protection.enabled": true,
"simpleSignUpLink.shown": false,
"mail_smtpsecure": "tls",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"twofactor_enforced": "true",
"twofactor_enforced_groups": [
"admin"
],
"twofactor_enforced_excluded_groups": [],
"has_rebuilt_cache": true,
"updater.release.channel": "stable",
"app_install_overwrite": [
"keeweb",
"radio"
]
}
}
Are you using external storage, if yes which one: local, webdav
Are you using encryption: no
Are you using an external user-backend, if yes which one: no
Nextcloud log (data/nextcloud.log)
Nextcloud log
Nothing related to this issue
Did it work fine prior to going to 17.0.3, and then after upgrading to 17.0.3 the app password quit working? If so, that was my experience. Had to delete and recreate app password.
Hmm. Not sure what change could be responsible: https://github.com/nextcloud/server/milestone/103?closed=1
I think in my instance (which has users linked to a ldap active directory), the user had recently changed their AD password. Then it appeared their app password quit working afterwards, and they got the same error message as the original user in this issue reported. Wonder if related to this change?
https://github.com/nextcloud/server/pull/18792/commits/d566cc520ee63823139a502b49be5d76800aa805
Did your issue creep up after a user password reset?
Did it work fine prior to going to 17.0.3, and then after upgrading to 17.0.3 the app password quit working? If so, that was my experience. Had to delete and recreate app password.
Update to 17.0.3 was performed on 31 of Jan at 10:30, 7 Days later on 6 th of Jan at 13:30 password was "broken". At this time I can see last succeed API call in logs of cacti.
Is this Issue still valid in NC21.0.2? If not, please close this issue. Thanks! :)
In #19515 was mentioned update from "from version 16 to 18.0.1" (it is going via 17) and here I see the problem in few days after update from 17.0.2 to 17.0.3. Ether it is one time problem of Version 17, or root cause was not found and can happens any time again.
I guess it makes more sense to open a new issue if it should happen again so I am closing this for now. Thanks for your answer though!