M150: Creating a User Administrator

Hi,
I created the user but it displayed later that authentication failed. Also my two tests failed, so i wanted to reset the workspace, since I am unable to proceed.
Hence, now when I try to reset the workspace, I am unable to do so for the exercise “Creating a User Administrator”.

Any help on the same would be great.

Regards,
Udayan

Is this a lab/final exam with limited attempts?
What error are you getting when you reset workspace?

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&b
d” )
Error: Authentication failed.
0

Am working on the following exercise:
Chapter 1: Database User Authentication

Learning Activity: Creating a User Administrator

You can authenticate only if user is created
Your user creation itself failed
If this lab is about creating user administrator why application data db related role in your creation statement
After creating admin user you have to login as that user and create other users
Try again with proper steps

Thanks @Ramachandra_Tummala , I again tried and it worked - but without the application data db reference.
Appreciate your quick help.