Skip to content

"Private Key missing for user: please try to log-out and log-in again" while resetting password... #427

@boldandbusted

Description

@boldandbusted

Steps to reproduce

homeserver-02 nextcloud # sudo -u apache php occ user:resetpassword <user_admin>
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
Warning: Resetting the password when using encryption will result in data loss!
Do you want to continue?yes
Enter a new password:
Confirm the new password:

[OCA\Encryption\Exceptions\PrivateKeyMissingException]
Private Key missing for user: please try to log-out and log-in again

user:resetpassword [--password-from-env] [--]

Expected behaviour

User password is changed without error.

Actual behaviour

Error thrown, with message proscribing a catch-22 scenario

Server configuration

Operating system:
Gentoo Linux
Web server:
Apache 2
Database:
MySQL
PHP version:
homeserver-02 nextcloud # sudo -u apache php -v
PHP 5.6.23-pl0-gentoo (cli) (built: Jul 8 2016 12:27:41)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-

Nextcloud version: (see Nextcloud admin page)
9.0.52
Updated from an older Nextcloud/ownCloud or fresh install:
Updated from Owncloud 8.2.1
Where did you install Nextcloud from:
Gentoo Portage
Signing status:

Signing status

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:

App list

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

The content of config/config.php:

Config report

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here
(Without the database password, passwordsalt and secret)

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

LDAP configuration (delete this part if not used)

LDAP config

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.
### Client configuration

Browser:

Operating system:

Logs

Web server error log

Web server error log

Insert your webserver log here
#### Nextcloud log (data/nextcloud.log)

Nextcloud log

Insert your Nextcloud log here
#### Browser log

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions