- Reference >
mongo
Shell Methods >- User Management Methods >
- db.changeUserPassword()
db.changeUserPassword()¶
On this page
Definition¶
Required Access¶
To modify the password of another user on a database, you must have the
changeAnyPassword
action
on that database.
Example¶
The following operation changes the password of the user named
accountUser
in the products
database to SOh3TbYhx8ypJPxmt1oOfL
: