This is a lab with infinite attempts
Reset of the workspace is not working. Even if I click on reset, the workspace is not reset.
I again tried the below but its not working and am blocked here.
…
user@M150# mongo --host localhost:27000
MongoDB shell version v4.4.3
connecting to: mongodb://localhost:27000/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { “id” : UUID(“5625cb1a-f994-430f-bec2-e338158a8653”) }
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.getUsers()
uncaught exception: Error: not authorized on test to execute command { usersInfo: 1.0, lsid: { id: UUID(“5625cb1a-f994-430f-bec2-e338158a8653”) }, $db: “test” } :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DB.prototype.getUsers@src/mongo/shell/db.js:1659:15
@(shell):1:1
use admin
switched to db admin
db.createUser({
… user: “globalAdminUser”,
… pwd: “5xd49$4%0bef#6c&bd",
… roles: [{role: “userAdminAnyDatabase”, db: “admin”}, {role: “readWrite”, db: “applicationData”}]
… })
uncaught exception: Error: couldn’t add user: not authorized on admin to execute command { createUser: “globalAdminUser”, pwd: “xxx”, roles: [ { role: “userAdminAnyDatabase”, db: “admin” }, { role: “readWrite”, db: “applicationData” } ], digestPassword: true, writeConcern: { w: “majority”, wtimeout: 600000.0 }, lsid: { id: UUID(“5625cb1a-f994-430f-bec2-e338158a8653”) }, $db: “admin” } :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DB.prototype.createUser@src/mongo/shell/db.js:1386:11
@(shell):1:1
db.auth( “globalAdminUser”, "5xd49$4%0bef#6c&bd” )
Error: Authentication failed.
0