Change first ldap-configuration with CLI not possible

Hello,

I have setup 2 ldap-configurations, I see both with:

sudo -u www-data php occ ldap:show-config

I can enable/disable the second configuration, but not the first, because there is no name. The second have a name:

Configuration | s01

I have try s00 and without name but it does not work.

Any ideas?

Unfortunately, I have just locked myself out.

Link from help: Using the occ command — Nextcloud latest Administration Manual latest documentation

What do you mean by it has no name?

s01 is the first one. Typically s02 would be the second one.

Unfortunately, I have just locked myself out.

You may be able to login by appending ?direct=1 to your Nextcloud URL.

OK, here I have save the (anonymized) output from “sudo -u www-data php occ ldap:show-config”:

+-------------------------------+----------------------------------------------------------------------------------------------------------------------+
| Configuration                 |                                                                                                                      |
+-------------------------------+----------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                                                                    |
| homeFolderNamingRule          | attr:uid                                                                                                             |
| lastJpegPhotoLookup           | 0                                                                                                                    |
| ldapAdminGroup                |                                                                                                                      |
| ldapAgentName                 |                                                                                                                      |
| ldapAgentPassword             | ***                                                                                                                  |
| ldapAttributeAddress          |                                                                                                                      |
| ldapAttributeBiography        |                                                                                                                      |
| ldapAttributeFediverse        |                                                                                                                      |
| ldapAttributeHeadline         |                                                                                                                      |
| ldapAttributeOrganisation     |                                                                                                                      |
| ldapAttributePhone            |                                                                                                                      |
| ldapAttributeRole             |                                                                                                                      |
| ldapAttributeTwitter          |                                                                                                                      |
| ldapAttributeWebsite          |                                                                                                                      |
| ldapAttributesForGroupSearch  |                                                                                                                      |
| ldapAttributesForUserSearch   |                                                                                                                      |
| ldapBackgroundHost            |                                                                                                                      |
| ldapBackgroundPort            |                                                                                                                      |
| ldapBackupHost                |                                                                                                                      |
| ldapBackupPort                |                                                                                                                      |
| ldapBase                      | dc=example,dc=de                                                                                                     |
| ldapBaseGroups                | dc=example,dc=de                                                                                                     |
| ldapBaseUsers                 | dc=example,dc=de                                                                                                     |
| ldapCacheTTL                  | 600                                                                                                                  |
| ldapConfigurationActive       | 1                                                                                                                    |
| ldapConnectionTimeout         | 15                                                                                                                   |
| ldapDefaultPPolicyDN          |                                                                                                                      |
| ldapDynamicGroupMemberURL     |                                                                                                                      |
| ldapEmailAttribute            | mail                                                                                                                 |
| ldapExperiencedAdmin          | 0                                                                                                                    |
| ldapExpertUUIDGroupAttr       |                                                                                                                      |
| ldapExpertUUIDUserAttr        | employeeNumber                                                                                                       |
| ldapExpertUsernameAttr        |                                                                                                                      |
| ldapExtStorageHomeAttribute   |                                                                                                                      |
| ldapGidNumber                 | gidNumber                                                                                                            |
| ldapGroupDisplayName          | cn                                                                                                                   |
| ldapGroupFilter               | (&(|(objectclass=groupOfNames)))                                                                                     |
| ldapGroupFilterGroups         |                                                                                                                      |
| ldapGroupFilterMode           | 0                                                                                                                    |
| ldapGroupFilterObjectclass    | groupOfNames                                                                                                         |
| ldapGroupMemberAssocAttr      | uniqueMember                                                                                                         |
| ldapHost                      | localhost                                                                                                            |
| ldapIgnoreNamingRules         |                                                                                                                      |
| ldapLoginFilter               | (&(&(|(objectclass=person))(|(memberof=cn=owncloud,ou=programme,ou=groups,dc=example,dc=de)))(|(employeeNumber=%uid))) |
| ldapLoginFilterAttributes     | employeeNumber                                                                                                       |
| ldapLoginFilterEmail          | 0                                                                                                                    |
| ldapLoginFilterMode           | 1                                                                                                                    |
| ldapLoginFilterUsername       | 0                                                                                                                    |
| ldapMatchingRuleInChainState  | unknown                                                                                                              |
| ldapNestedGroups              | 0                                                                                                                    |
| ldapOverrideMainServer        |                                                                                                                      |
| ldapPagingSize                | 500                                                                                                                  |
| ldapPort                      | 389                                                                                                                  |
| ldapQuotaAttribute            |                                                                                                                      |
| ldapQuotaDefault              |                                                                                                                      |
| ldapTLS                       | 0                                                                                                                    |
| ldapUserAvatarRule            | default                                                                                                              |
| ldapUserDisplayName           | cn                                                                                                                   |
| ldapUserDisplayName2          |                                                                                                                      |
| ldapUserFilter                | (&(|(objectclass=inetOrgPerson)(objectclass=person))(|(memberof=cn=owncloud,ou=Programme,ou=groups,dc=example,dc=de))) |
| ldapUserFilterGroups          | owncloud                                                                                                             |
| ldapUserFilterMode            | 1                                                                                                                    |
| ldapUserFilterObjectclass     | inetOrgPerson;person                                                                                                 |
| ldapUuidGroupAttribute        | auto                                                                                                                 |
| ldapUuidUserAttribute         | auto                                                                                                                 |
| markRemnantsAsDisabled        | 0                                                                                                                    |
| turnOffCertCheck              | 0                                                                                                                    |
| turnOnPasswordChange          | 0                                                                                                                    |
| useMemberOfToDetectMembership | 1                                                                                                                    |
+-------------------------------+----------------------------------------------------------------------------------------------------------------------+
+-------------------------------+----------------------------------------------------------------------------------------------------------------------+
| Configuration                 | s01                                                                                                                  |
+-------------------------------+----------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 0                                                                                                                    |
| homeFolderNamingRule          |                                                                                                                      |
| lastJpegPhotoLookup           | 0                                                                                                                    |
| ldapAdminGroup                |                                                                                                                      |
| ldapAgentName                 |                                                                                                                      |
| ldapAgentPassword             | ***                                                                                                                  |
| ldapAttributeAddress          |                                                                                                                      |
| ldapAttributeBiography        |                                                                                                                      |
| ldapAttributeFediverse        |                                                                                                                      |
| ldapAttributeHeadline         |                                                                                                                      |
| ldapAttributeOrganisation     |                                                                                                                      |
| ldapAttributePhone            |                                                                                                                      |
| ldapAttributeRole             |                                                                                                                      |
| ldapAttributeTwitter          |                                                                                                                      |
| ldapAttributeWebsite          |                                                                                                                      |
| ldapAttributesForGroupSearch  |                                                                                                                      |
| ldapAttributesForUserSearch   |                                                                                                                      |
| ldapBackgroundHost            |                                                                                                                      |
| ldapBackgroundPort            |                                                                                                                      |
| ldapBackupHost                |                                                                                                                      |
| ldapBackupPort                | 636                                                                                                                  |
| ldapBase                      | dc=example,dc=de                                                                                                     |
| ldapBaseGroups                | dc=example,dc=de                                                                                                     |
| ldapBaseUsers                 | dc=example,dc=de                                                                                                     |
| ldapCacheTTL                  | 600                                                                                                                  |
| ldapConfigurationActive       | 0                                                                                                                    |
| ldapConnectionTimeout         | 15                                                                                                                   |
| ldapDefaultPPolicyDN          |                                                                                                                      |
| ldapDynamicGroupMemberURL     |                                                                                                                      |
| ldapEmailAttribute            | mail                                                                                                                 |
| ldapExperiencedAdmin          | 0                                                                                                                    |
| ldapExpertUUIDGroupAttr       |                                                                                                                      |
| ldapExpertUUIDUserAttr        |                                                                                                                      |
| ldapExpertUsernameAttr        |                                                                                                                      |
| ldapExtStorageHomeAttribute   |                                                                                                                      |
| ldapGidNumber                 | gidNumber                                                                                                            |
| ldapGroupDisplayName          | cn                                                                                                                   |
| ldapGroupFilter               | (&(|(objectclass=groupOfNames)))                                                                                     |
| ldapGroupFilterGroups         |                                                                                                                      |
| ldapGroupFilterMode           | 0                                                                                                                    |
| ldapGroupFilterObjectclass    | groupOfNames                                                                                                         |
| ldapGroupMemberAssocAttr      |                                                                                                                      |
| ldapHost                      | ldaps://auth-server.example.de                                                                                       |
| ldapIgnoreNamingRules         |                                                                                                                      |
| ldapLoginFilter               | (&(&(|(objectclass=person))(|(memberof=cn=owncloud,ou=programme,ou=groups,dc=example,dc=de)))(|(employeeNumber=%uid))) |
| ldapLoginFilterAttributes     |                                                                                                                      |
| ldapLoginFilterEmail          | 0                                                                                                                    |
| ldapLoginFilterMode           | 0                                                                                                                    |
| ldapLoginFilterUsername       | 1                                                                                                                    |
| ldapMatchingRuleInChainState  | unknown                                                                                                              |
| ldapNestedGroups              | 0                                                                                                                    |
| ldapOverrideMainServer        |                                                                                                                      |
| ldapPagingSize                | 500                                                                                                                  |
| ldapPort                      | 636                                                                                                                  |
| ldapQuotaAttribute            |                                                                                                                      |
| ldapQuotaDefault              |                                                                                                                      |
| ldapTLS                       | 0                                                                                                                    |
| ldapUserAvatarRule            | default                                                                                                              |
| ldapUserDisplayName           | displayName                                                                                                          |
| ldapUserDisplayName2          |                                                                                                                      |
| ldapUserFilter                | (&(|(objectclass=inetOrgPerson)(objectclass=person))(|(memberof=cn=owncloud,ou=Programme,ou=groups,dc=example,dc=de))) |
| ldapUserFilterGroups          |                                                                                                                      |
| ldapUserFilterMode            | 1                                                                                                                    |
| ldapUserFilterObjectclass     |                                                                                                                      |
| ldapUuidGroupAttribute        | auto                                                                                                                 |
| ldapUuidUserAttribute         | auto                                                                                                                 |
| markRemnantsAsDisabled        | 0                                                                                                                    |
| turnOffCertCheck              | 1                                                                                                                    |
| turnOnPasswordChange          | 0                                                                                                                    |
| useMemberOfToDetectMembership | 1                                                                                                                    |
+-------------------------------+----------------------------------------------------------------------------------------------------------------------+

the first config have no name, so I can not change the config over CLI.

Found the solution here: Weird ldap configID required for the ldap:test-config occ command (OC 7.0.5) · Issue #13981 · owncloud/core · GitHub

If you need to set any configuration value, you can do ./occ ldap:set-config '' key value

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.