core icon indicating copy to clipboard operation
core copied to clipboard

Unable to update private key password issue after ActiveDirectory password change

Open GCC0THerbst opened this issue 11 years ago • 9 comments

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

  1. Activate basic encryption module
  2. Enter recovery password
  3. Activate LDAP user backend
  4. Configure LDAP backend, server and filters
  5. Verify and check configuration
  6. Log in with available LDAP user and password
  7. Activate password recovery for basic encryption module
  8. Log out
  9. Change password on the AD site
  10. Log in with new password
  11. Get the private key password error message
  12. Try to update password in the personal section
  13. Get the unable to update private key password error message
  14. Log out
  15. Log in with administrator account
  16. Try to update the users password by using the recovery password
  17. Get the unable to change password on user backend error message
  18. Log out
  19. Log in with the user with new password
  20. Get the private key password error message
  21. Try to update the private key password again
  22. Get the unable to update private key password error message
  23. Recognize that you can’t access any of your files
  24. Recognize that the administrator is unable to help you
  25. Remember, that you’re the administrator
  26. 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!

GCC0THerbst avatar Nov 02 '15 09:11 GCC0THerbst

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 avatar Nov 02 '15 09:11 DeepDiver1975

@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.

GCC0THerbst avatar Nov 02 '15 09:11 GCC0THerbst

I'm talking about the password change of the encryption key

DeepDiver1975 avatar Nov 02 '15 09:11 DeepDiver1975

@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.

GCC0THerbst avatar Nov 02 '15 09:11 GCC0THerbst

Ah .. okay. Hmmmm ..... @blizzz @schiesbn can I ask you to have a look? THX

DeepDiver1975 avatar Nov 02 '15 10:11 DeepDiver1975

@GCC0THerbst can you upgrade to 8.1.4? I'm quite sure that this will fix it: https://github.com/owncloud/core/pull/19011

schiessle avatar Nov 02 '15 14:11 schiessle

@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:

GCC0THerbst avatar Nov 02 '15 15:11 GCC0THerbst

Great to hear that the update worked for you :)

schiessle avatar Nov 02 '15 15:11 schiessle

THX @schiesbn

DeepDiver1975 avatar Nov 02 '15 16:11 DeepDiver1975