Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-413

set_variable_values_ini for values with equal sign

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Unconfirmed
    • Priority: (None)
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Promise type: files
    • Labels:
      None

      Description

      I am trying to edit /etc/sssd/sssd.cf with set_variable_values_ini and finding there is a problem with ldap_default_bind_dn and ldap_search_base since it keep appending to the end of those lines:

      ldap_search_base=dc=ch,dc=lan=ch,dc=lan=ch,dc=lan
      ldap_default_bind_dn=uid=unix-auth-name,ou=Service Accounts,dc=ch,dc=lan=unix-auth-name,ou=Service Accounts,dc=ch,dc=lan=unix-auth-name,ou=Service Accounts,dc=ch,dc=lan
      

      it should just be:

      ldap_search_base=dc=ch,dc=lan
      ldap_default_bind_dn=uid=unix-auth-name,ou=Service Accounts,dc=ch,dc=lan
      

      All of the other variables set just fine. Just these two have problems.

      Here is my promise:

      vars:   
                      "sssd[domain/default][ldap_uri]" string => "ldaps://ldap01.ch.lan,ldaps://ldap02.ch.lan";
                      "sssd[domain/default][ldap_default_authtok_type]" string => "password";
                      "sssd[domain/default][ldap_tls_cacertdir]" string => "/etc/openldap/certs";
                      "sssd[domain/default][ldap_tls_reqcert]" string => "never";
                      "sssd[domain/default][auth_provider]" string => "ldap";
                      "sssd[domain/default][chpass_provider]" string => "ldap";
                      "sssd[domain/default][id_provider]" string => "ldap";
                      "sssd[domain/default][enumerate]" string => "true";
                      "sssd[domain/default][ldap_default_bind_dn]" string => "uid=unix-auth-name,ou=Service Accounts,dc=ch,dc=lan";
                      "sssd[domain/default][ldap_search_base]" string => "dc=ch,dc=lan";
      files:  
                      "/etc/sssd/sssd.conf"
                              handle => "sssd_conf",
                              comment => "updated entries in /etc/sssd/sssd.conf file",
                              edit_line => set_variable_values_ini("sssd_conf.sssd", "domain/default"),
                              perms => mog("0600", "root", "root"),
                              classes => if_repaired("restart_sssd");
      
      

      cat /etc/sssd/sssd.conf

      [domain/default]
      enumerate=true
      ldap_id_use_start_tls=True
      cache_credentials=True
      ldap_search_base=dc=ch,dc=lan
      id_provider=ldap
      auth_provider=ldap
      chpass_provider=ldap
      ldap_uri=ldaps://ldap01.ch.lan,ldaps://ldap02.ch.lan
      ldap_default_bind_dn=uid=unix-auth-name,ou=Service Accounts,dc=ch,dc=lan
      ldap_default_authtok_type=password
      ldap_default_authtok=password
      ldap_tls_cacertdir=/etc/openldap/certs
      ldap_tls_reqcert=never
      [sssd]
      services=nss, pam
      config_file_version=2
      domains=default
      [nss]
      
      [pam]
      
      [sudo]
      
      [autofs]
      
      [ssh]
      
      

      Is there anything I can do to make this work?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10042 Nick Anderson
                Reporter:
                jgrantvml Jeremy Grant
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel