Month End Sale Special Limited Time 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: CFsave75

MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+) C100DBA Question # 51 Topic 6 Discussion

MongoDB Associate Database Administrator(Based on MongoDB 6.0 and 7.0+) C100DBA Question # 51 Topic 6 Discussion

C100DBA Exam Topic 6 Question 51 Discussion:
Question #: 51
Topic #: 6

What command is used to grant a role " customRole1 " to an existing user called " user1 " ?


A.

db.grantRoles( " user1 " , [ " customRole1 " ])


B.

db.createUser({ user: " user1 " , pwd: " pwd1 " , roles: [{ role: " customRole1 " , db: " admin " }] })


C.

db.addRoleToUser( " user1 " , [ " customRole1 " ])


D.

db.grantRolesToUser( " user1 " , [ " customRole1 " ])


Get Premium C100DBA Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.