1

We have LDAP authentication configured in our owncloud and cannot remember the password for our ldap backend anymore. I have found the ldap_agent_password setting in the database which seems to store an encrypted string of that password.

How to display the password in plain text?

ohcibi
  • 2,518
  • 3
  • 24
  • 47

1 Answers1

1

The ldap password isn't stored encrypted, instead it's only encoded with base64. To fetch it from the database use the following query:

SELECT * FROM oc_appconfig WHERE appid='user_ldap' AND configkey='ldap_agent_password';

Copy the configvalue and paste it in the following command:

echo "VALUE" | base64 -d 

For example if the query returns dGVzdDQyCg== execute:

echo "dGVzdDQyCg==" | base64 -d 

which will return test42.

LEDfan
  • 175
  • 1
  • 2
  • 17
  • Thanks mate! I'm not sure if this is because of bsd vs linux but on macOS the option is `-D` instead of `-d`. – ohcibi Jul 23 '18 at 10:51