-
Type: Bug
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: 4.0.1, 4.0.2
-
Component/s: None
-
None
-
ALL
-
With MongoDB versions 4 (4.0.1 and 4.0.2 tested), I cannot switch to another db, authenticate, and operate with that db. In MongoDB 3.6, I can successfully do this:
~$ mongo mongodb://daniel:mahpass@127.0.0.1:27017/admin
{{ MongoDB shell version v3.6.7}}
{{ connecting to: mongodb://127.0.0.1:27017/admin}}
{{ MongoDB server version: 3.6.7}}
{{ > var mother = db.getSiblingDB('mother')}}
{{ > mother.auth(}}{{
}})
{{ 1}}
{{ > mother.sites.find()}}{{
}}
>
My user was created on the admin database first, with "dbOwner" and "userAdminAnyDatabase" rights, and then on the "mother" database with "dbOwner" rights.
In other words, these are two different users, one on each db.
Googling the error, I only get four hits, one in Chinese, and the remaining I cannot see how are related. I've searched through the 4.0 changes, and cannot find any documented change that would cause this restriction — if indeed it is a restriction? Maybe this isn't a bug, and it's just me misbehaving?
Thanks
Daniel
- related to
-
SERVER-32064 A logical session id should be included in all command requests from the mongo shell
- Closed