Learning Activity: Modifying User Passwords

I can only pass 3 out of 4 tests in this learning activity.

Here’s what the terminal looks like:

user@M150# mongo admin --port 27000 --username ‘globalAdminUser’ --password ‘5xd49$4%0bef#6c&b*d’
MongoDB shell version v4.4.3
connecting to: mongodb://127.0.0.1:27000/admin?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { “id” : UUID(“c08e5ec0-382f-4209-b23d-70254040e50f”) }
MongoDB server version: 4.4.3
Welcome to the MongoDB shell.
For interactive help, type “help”.
For more comprehensive documentation, see
https://docs.mongodb.com/
Questions? Try the MongoDB Developer Community Forums
https://community.mongodb.com

db.updateUser(
… “readWriteInventoryUser”,
… {
… pwd: “6c%dbe&7dc!ee1#d”,
… roles: []
… })

And here’s a screenshot of the error message I am getting. It says I may have dropped the user - which I have not. Even if that was the case, it’s still able to validate the password change. Am I doing something wrong? :expressionless:

By specifying roles: [ ] you removed all access that the user had. Try to Reset Workspace and only change the password as requested.

1 Like