Owcloud config change ldap password


I’m new to owcloud system nad i need some help regarding ldap configuration.

I nee to change the configuration to set a new ldapagent password,
I check on many forum nad it looks that i have to run te command

sudo -u www-data php /var/www/owncloud/occ ldap:set-config:ldapAgentPassword:testepassword

but when i hit enter i receive this error

There are no commands defined in the “ldap:set-config:ldapAgentPassword” namespace.

Can any one help please?


You can get the help for a occ command by typing --help after the command.

occ ldap:set-config --help
  modifies an LDAP configuration

  ldap:set-config <configID> <configKey> <configValue>

  configID              the configuration ID
  configKey             the configuration key
  configValue           the new configuration value

First you have to use this command:

occ ldap:show-config

so you get the configID

let’s assume it’s s01.

If you don’t see one - you don’t have one. Then the config ID is empty.

Assuming your configID is s01 the command would be:

ldap:set-config s01 ldapAgentPassword testpassword

1 Like


The problem is exactly that, this is my config

| Configuration                 |                                                                                                         |
| hasMemberOfFilterSupport      | 0                                                                                                       |
| hasPagedResultSupport         |                                                                                                         |
| homeFolderNamingRule          |                                                                                                         |
| lastJpegPhotoLookup           | 0                                                                                                       |
| ldapAgentName                 | MB-PT-AUTH-APPLI                                                                                        |
| ldapAgentPassword             | ***                                                                                                     |

with no configID ,ad if i try to set password i always have the error

root@ATPSRVCLD01:~# sudo -u www-data php /var/www/owncloud/occ ldap:set-config ldapAgentPassword testpassword

  Not enough arguments (missing: "configValue").

Please enable some kind of spellchecker :slight_smile:

I edit your post for visibility and for grammar. I would prefer to only do one of those edits.

can you try

sudo -u www-data php /var/www/owncloud/occ ldap:get-config '' ldapAgentPassword testpassword

I have tested it and it works on my server:

occ ldap:show-config
| Configuration                 |                                                                                                                                      |
| hasMemberOfFilterSupport      | 1

| ldapUserDisplayName2          |

occ ldap:set-config '' ldapUserDisplayName2 sn
| ldapUserDisplayName2          | sn
1 Like

If you are wondering why I am executing just occ and you have to execute it with the web server user - I am using a helper script from our documentation at doc.owncloud.com


1 Like

Tank you dmitry,

With the option ‘’ it work’s

About the option to install on Ubuntu 18 i will take into consideration, since i will need to upgrade de OS too.

Once again tank you for your help!

1 Like