#Password for SVM user is not set

1 messages · Page 1 of 1 (latest)

molten jolt
#

Hello everyone,
I create a user in an SVM via "netapp.ontap.na_ontap" and set a password:

    netapp.ontap.na_ontap_user:
      state: present
      name: "{{ var_pb_backup_user_username }}"
      applications: ontapi,http
      authentication_method: password
      set_password: "{{ var_pb_backup_user_password }}"
      lock_user: false
      role_name: vsadmin
      vserver: "{{ var_pb_primary_vserver_name }}"
      https: true
      use_rest: always
      validate_certs: false
      hostname: "{{ var_pb_primaryCluster }}"
      username: "{{ var_pb_username }}"
      password: "{{ var_pb_password }}"

The task is executed successfully and the user is also created. However, the provided password is not set

jovial fjord
#

@molten jolt checking from our end

jovial fjord
#

@molten jolt Can you please try creating user and set password from cluster level?

molten jolt
#

@jovial fjord Do you mean creating a user in the cluster SVM?

jovial fjord
#

@molten jolt Tried creating user with vsadmin role for svm level and user with admin role for cluster level, the password is set without any issue from my end. So if you able to create user with password for cluster then we can find where the issue is?

molten jolt
#

@jovial fjord
I've just done some more testing and found a crazy error that I can't explain at the moment.
Normally I create a random password as follows:

vars:
    - var_role_backupUserPassword: "{{ lookup('password', '/dev/null chars=ascii_letters,digits length=32') }}"

which then leads to the following result:

TASK [create User] *****************************************************************************************************
changed: [localhost]

TASK [debug] ***********************************************************************************************************
ok: [localhost] => {
    "var_role_backupUserPassword": "ILXFjg02JgVjj57HDQ1JFW3IZZG9ctIV"
}

If I now set this password again via CLI, it works, which means that it was not set before, otherwise you would get an error (see next test):

cluster01::> security login password -vserver abc_svm01 -username ansible-test

Enter a new password:
Enter it again:

cluster01::>

If I now execute the same playbook, but instead of generating a password I store a fixed password in the same variable, this is set cleanly:

vars:
    - var_role_backupUserPassword: "NetApp1234567"

This run then looks as follows:

TASK [create User] *****************************************************************************************************
changed: [localhost]

TASK [debug] ***********************************************************************************************************
ok: [localhost] => {
    "var_role_backupUserPassword": "NetApp1234567"
}

And now when I try to set the same password again via CLI, I get the following error, which means that the password is already set:

cluster01::> security login password -vserver abc_svm01 -username ansible-test

Enter a new password:
Enter it again:

Error: command failed: New password must be different from the old password.

cluster::>

Do you have any ideas?

jovial fjord
#

@molten jolt Will test the scenario and let you know

molten jolt
#

@jovial fjord Have you already been able to reproduce the scenario?