1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
| [root@db01 ~] MongoDB shell version v4.0.18 connecting to: mongodb://db01:27017/admin?gssapiServiceName=mongodb Implicit session: session { "id" : UUID("33cae6b1-0190-4727-a5f1-34b38ea3b5e4") } MongoDB server version: 4.0.18 > > use admin switched to db admin
> show tables system.users system.version
> db.system.users.find().pretty() { "_id" : "admin.admin", "userId" : UUID("f4e51f24-80da-4019-aa50-49d734129d84"), "user" : "admin", "db" : "admin", "credentials" : { "SCRAM-SHA-1" : { "iterationCount" : 10000, "salt" : "SkrunLAeUsCnfXukvxNN3A==", "storedKey" : "oGsqoaSvZd0Vp1Nn0j/nrSji+io=", "serverKey" : "V6oIEmIsHRK089Q2sJVBZLNfN4A=" }, "SCRAM-SHA-256" : { "iterationCount" : 15000, "salt" : "N4SD+uXm6QxAWrxRAhOq91GZ1uFVqMWxJylq3w==", "storedKey" : "frPnGOZT7OGyLtmiaVFUn6bT6wTIvjsjbCdLJ26ViW0=", "serverKey" : "OdPEqSsOp0gsrfumtJifo8MHqzQoztVpyRvmuyi9Mhk=" } }, "roles" : [ { "role" : "root", "db" : "admin" } ] } { "_id" : "pincheng.pcadmin", "userId" : UUID("8a6820f5-3f7c-433e-9063-d749640b1182"), "user" : "pcadmin", "db" : "pincheng", "credentials" : { "SCRAM-SHA-1" : { "iterationCount" : 10000, "salt" : "Aufl+IvD/jlZ/dUMxtRSYQ==", "storedKey" : "6sUX37TBhtpzDUFKm38aiAomE1o=", "serverKey" : "nvu/Oe4PeKRoo2JlYBjqREC6K2Y=" }, "SCRAM-SHA-256" : { "iterationCount" : 15000, "salt" : "a4qolXg2fL2vFQ5ZY7ysRhEC4KeJgzmSacGfDQ==", "storedKey" : "dAuTfKe3EwachRPrGTi+uIJ2p/N4JpwOns94/z7P/ZA=", "serverKey" : "s2L1ykMsbc/bVH9ghUXhwVva+lr7TrVqvsku2tbsHx8=" } }, "roles" : [ { "role" : "dbAdmin", "db" : "pincheng" } ] } { "_id" : "pincheng.user", "userId" : UUID("32f1de87-4f56-420b-8de4-2f9f0aa810b8"), "user" : "user", "db" : "pincheng", "credentials" : { "SCRAM-SHA-1" : { "iterationCount" : 10000, "salt" : "02ZrtW4H6EyAPXa+cJhWSg==", "storedKey" : "e/Sz5iQ/gHrrZi9Zw+OgIMBCz/s=", "serverKey" : "ijrwnfWpNSHeKi8Xaz7PU+JDIKU=" }, "SCRAM-SHA-256" : { "iterationCount" : 15000, "salt" : "3r97fhSufXHdFlZ34Y8jDFggxGUartgIb93Tsw==", "storedKey" : "yZaquoT2uYERp2nuTyXoM55oJYbIiHmDTEogF/nwWXM=", "serverKey" : "U8mb8FfqMqMZQXeviAopXFwNl/8AwPeRmlWJw7S2YFY=" } }, "roles" : [ { "role" : "readWrite", "db" : "pincheng" } ] } { "_id" : "test.myTester", "userId" : UUID("209bcfec-90b2-4ad1-b999-4387f944bc18"), "user" : "myTester", "db" : "test", "credentials" : { "SCRAM-SHA-1" : { "iterationCount" : 10000, "salt" : "nxFoDJR+9AIJodm/JmT7ww==", "storedKey" : "42iXAR7M5xxnoOUP/z2pz3kL090=", "serverKey" : "FsQdmNKGjDJ8QAkop1yP1ERy54I=" }, "SCRAM-SHA-256" : { "iterationCount" : 15000, "salt" : "4gcUf9gCwwSgS8JAEpq2Dmm+XEbVeLUTH61aPA==", "storedKey" : "Qz2hBVdZV/zQ8V4lqv5gPVyJinhtDCKE0PARe9KSrdc=", "serverKey" : "KH9KD3DZtCSE8DlO44eNpTAIm/m/4hflLjBNfNZ+dLM=" } }, "roles" : [ { "role" : "readWrite", "db" : "test" }, { "role" : "read", "db" : "test2" } ] }
|