def METHOD_NAME(self):
    """Check that user can't be authenticated if both `ldap` and `password`
    is specified for the same user. We expect an error message to be present in the log
    and login attempt to fail.
    """
    node = self.context.node
    servers = {
        "openldap1": {
            "host": "openldap1", "port": "389", "enable_tls": "no",
            "auth_dn_prefix": "cn=", "auth_dn_suffix": ",ou=users,dc=company,dc=com"
        },
    }
    user = {
        "server": "openldap1", "username": "user1", "password": "user1", "login": True,
        "errorcode": 4,
        "message": "DB::Exception: user1: Authentication failed: password is incorrect or there is no user with such name"
    }
    with When("I first create regular user configuration file"):
        config = create_ldap_users_config_content(user)
    with And("I modify it to add explicit password"):
        root = xmltree.fromstring(config.content)
        xml_users = root.find("users")
        xml_users.append(xmltree.Comment(text=f"LDAP users {config.uid}"))
        xml_user = xml_users.find(user["username"])
        xml_append(xml_user, "password", "hellothere")
        xml_indent(root)
        content = xml_with_utf8 + str(xmltree.tostring(root, short_empty_elements=False, encoding="utf-8"), "utf-8")
        new_config = Config(content, config.path, config.name, config.uid, config.preprocessed_name)
    error_message = "DB::Exception: More than one field of 'password'"
    with Then("I expect an error when I try to load the configuration file", description=error_message):
        invalid_user_config(servers, new_config, message=error_message, tail=30)