Unable to update private key password issue after ActiveDirectory password change
Hi there,
we're hosting the ownCloud server 8.1.3 with basic encryption and LDAP user backend, for using AD users within ownCloud. After setting up the third server, a user changed its password and rings up for help, because she wasn't able to access any files.
Then we tried to update the private key password as her user, that didn't worked. And updating the password by using the administrator tool with recovery password did the same... nothing. Fortunately she recognized her old password, so we're able to set it back to the old state on the AD site. After doing so, she was able to access her files for now.
We've tried to change the LDAP configuration but that didn't took any affect on this. Also we've followed as mentioned on this issue: https://github.com/owncloud/core/issues/12361
Within the ownCloud server administration section no configuration errors are shown, LDAP configuration is OK and status is green. Users can be found and log in as wanted and configured.
Steps to reproduce
- Activate basic encryption module
- Enter recovery password
- Activate LDAP user backend
- Configure LDAP backend, server and filters
- Verify and check configuration
- Log in with available LDAP user and password
- Activate password recovery for basic encryption module
- Log out
- Change password on the AD site
- Log in with new password
- Get the private key password error message
- Try to update password in the personal section
- Get the unable to update private key password error message
- Log out
- Log in with administrator account
- Try to update the users password by using the recovery password
- Get the unable to change password on user backend error message
- Log out
- Log in with the user with new password
- Get the private key password error message
- Try to update the private key password again
- Get the unable to update private key password error message
- Recognize that you can’t access any of your files
- Recognize that the administrator is unable to help you
- Remember, that you’re the administrator
- Take a towel and try not to get into panic
Disaster recovery… Only possible if user can remember last used password, so the password can be changed back on the AD site.
Expected behaviour
Changing the password on AD site and updating the private key password within ownCloud works smoothly out of the box - because if the user can log in with the new password, then the system recognizes it and can grab the information as needed to do as wanted.
Actual behaviour
Changing the password on AD site causes data loss, because the encrypted files can’t be accessed and bringing up the discussion of the productive usage of ownCloud server, because if an important user looses its password and critical data is stored securely, then no one will be able to recover the stored files, without knowing the old password, because the password recovery functionality won’t work in this case!
Server configuration
Operating system: Ubuntu Server 14.04.3 LTS
Web server: Apache 2.4.7
Database: 5.5.46
PHP version: 5.5.9
ownCloud version: 8.1.3
Updated from an older ownCloud or fresh install: Productive servers
List of activated apps:
Enabled:
- activity: 2.0.2
- encryption: 1.0.0
- external: 1.2
- files: 1.1.10
- files_locking:
- files_pdfviewer: 0.7
- files_sharing: 0.6.2
- files_texteditor: 0.4
- files_trashbin: 0.6.3
- files_versions: 1.0.6
- files_videoviewer: 0.1.3
- firstrunwizard: 1.1
- gallery: 0.6.0
- provisioning_api: 0.2
- templateeditor: 0.1
- user_ldap: 0.6.1
Disabled:
- files_antivirus
- files_external
- updater
- user_external
- user_webdavauth
The content of config/config.php:
'---', 'passwordsalt' => '---', 'secret' => '---', 'trusted_domains' => array ( 0 => 'HOSTNAME', 1 => 'IPADDRESS', ), 'datadirectory' => '/media/oc_datastore', 'overwrite.cli.url' => 'https://HOSTNAME', 'dbtype' => 'mysql', 'version' => '8.1.3.0', 'dbname' => 'oc_db', 'dbhost' => 'localhost', 'dbtableprefix' => 'oc_', 'dbuser' => 'oc_sql', 'dbpassword' => '---', 'logtimezone' => 'CET', 'installed' => true, 'memcache.local' => '\OC\Memcache\Memcached', 'ldapIgnoreNamingRules' => false, 'mail_smtpmode' => 'smtp', 'mail_from_address' => 'owncloud', 'mail_domain' => 'HOSTNAME', 'mail_smtphost' => 'IPADDRESS', 'mail_smtpport' => '25', 'maintenance' => false, ); **Are you using external storage, if yes which one:** No **Are you using encryption:** yes **Are you using an external user-backend, if yes which one:** LDAP #### LDAP configuration +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Configuration | | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | hasMemberOfFilterSupport | 1 | | hasPagedResultSupport | | | homeFolderNamingRule | | | lastJpegPhotoLookup | 0 | | ldapAgentName | CN=Administrator,CN=Users,DC=de,DC=DOMAIN,DC=local | | ldapAgentPassword | **\* | | ldapAttributesForGroupSearch | | | ldapAttributesForUserSearch | | | ldapBackupHost | | | ldapBackupPort | | | ldapBase | DC=de,DC=DOMAIN,DC=local | | ldapBaseGroups | DC=de,DC=DOMAIN,DC=local | | ldapBaseUsers | DC=de,DC=DOMAIN,DC=local | | ldapCacheTTL | 600 | | ldapConfigurationActive | 1 | | ldapEmailAttribute | mail | | ldapExperiencedAdmin | 0 | | ldapExpertUUIDGroupAttr | | | ldapExpertUUIDUserAttr | | | ldapExpertUsernameAttr | | | ldapGroupDisplayName | cn | | ldapGroupFilter | (|(cn=HOSTNAME)) | | ldapGroupFilterGroups | HOSTNAME | | ldapGroupFilterMode | 0 | | ldapGroupFilterObjectclass | | | ldapGroupMemberAssocAttr | member | | ldapHost | IPADDRESS | | ldapIgnoreNamingRules | | | ldapLoginFilter | (&(&(|(objectclass=person))(|(|(memberof=CN=HOSTNAME,OU=Gruppen,OU=CITY,OU=COMPANY,DC=de,DC=DOMAIN,DC=local)(primaryGroupID=1234))))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid))(|(displayName=%uid)))) | | ldapLoginFilterAttributes | displayName | | ldapLoginFilterEmail | 1 | | ldapLoginFilterMode | 0 | | ldapLoginFilterUsername | 1 | | ldapNestedGroups | 0 | | ldapNoCase | 0 | | ldapOverrideMainServer | | | ldapPagingSize | 500 | | ldapPort | 389 | | ldapQuotaAttribute | | | ldapQuotaDefault | | | ldapTLS | 0 | | ldapUserDisplayName | displayname | | ldapUserFilter | (&(|(objectclass=person))(|(|(memberof=CN=HOSTNAME,OU=Gruppen,OU=CITY,OU=COMPANY,DC=de,DC=DOMAIN,DC=local)(primaryGroupID=1234)))) | | ldapUserFilterGroups | HOSTNAME | | ldapUserFilterMode | 0 | | ldapUserFilterObjectclass | person | | ldapUuidGroupAttribute | auto | | ldapUuidUserAttribute | auto | | turnOffCertCheck | 0 | | useMemberOfToDetectMembership | 1 | +-------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ### Client configuration **Browser:** Safari, Firefox, Opera, Chrome **Operating system:** MacOS, Windows, ### Logs #### Web server error log No errors #### ownCloud log (data/owncloud.log) {"reqId“:“---","remoteAddr“:"IPADDRESS","app":"core","message":"Login failed: 'AD_USER_STRING' (Remote IP: 'IPADDRESS)","level":2,"time":"2015-10-30T09:03:39+01:00"} {"reqId“:“---","remoteAddr":"IPADDRESS","app":"PHP","message":"ldap_read(): Search: Invalid DN syntax at \/var\/www\/owncloud\/apps\/user_ldap\/lib\/ldap.php#257","level":3,"time":"2015-10-30T09:05:11+01:00"} {"reqId“:“---","remoteAddr":"IPADDRESS","app":"user_ldap","message":"Bind failed: 49: Invalid credentials","level":2,"time":"2015-10-30T09:09:40+01:00"} {"reqId“:“---","remoteAddr":"IPADDRESS","app":"core","message":"Login failed: 'AD_DISPLAYNAME' (Remote IP: 'IPADDRESS)","level":2,"time":"2015-10-30T09:09:40+01:00"} #### Browser log No errors What can we do, what we've done wrong or do we've to wait until you provide an update, which'll solve this? If we can provide additional data or helping by answering your questions, feel free to ask, please! Thanks!
What can we do, what we've done wrong or do we've to wait until you provide an update, which'll solve this?
in th personal settings there is a section which allows you to change the password
@DeepDiver1975 The LDAP user backend is not able to change a LDAP users password. Because this app does not write to LDAP. So the user has not the ability to change the own password on the ownCloud site for an AD account.
I'm talking about the password change of the encryption key
@DeepDiver1975 Okay. As written in Step 13, you get an error message if trying to update the private keys to the new user password. The private keys can't be updated, because the update function does not recognize the new password and prints, that the new and present password is not valid - but you're still logged in with the new password.
Ah .. okay. Hmmmm ..... @blizzz @schiesbn can I ask you to have a look? THX
@GCC0THerbst can you upgrade to 8.1.4? I'm quite sure that this will fix it: https://github.com/owncloud/core/pull/19011
@schiesbn I've upgraded our ownCloud server test environment and yes, in the lab it worked! I'll inform the IT management, that we've to upgrade all ownCloud servers from 8.1.3 to 8.1.4 - I've tested with changing password as a normal user, who knows his old password using the private key update function and as an administrator, by using password recovery, if the password has been reset by the AD administrator, because user forgot its password. Both ways ended in a great success! Many thanks to you! :+1:
Great to hear that the update worked for you :)
THX @schiesbn