Modifying User Passwords

uncaught exception: Error: Updating user failed: User and role names must be either strings or objects :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DB.prototype.updateUser@src/mongo/shell/db.js:1436:11
@(shell):1:1

I have tried to update the password for a user using updateUser method. but it is not working.

can any one suggest?

Thank you

Hi @Umang_Dosi1, welcome to the community.
Can you please post the complete command that resulted in this error?

In case you have any doubts, please feel free to reach out to us.

Thanks and Regards.
Sourabh Bagrecha,
Curriculum Services Engineer