@@ -42,8 +42,8 @@ Authentication Database
42
42
When adding a user, you create the user in a specific database. This
43
43
database is the authentication database for the user.
44
44
45
- A user can have privileges across different databases; i.e. a user's
46
- privileges are not limited to the authentication database. By assigning
45
+ A user can have privileges across different databases; that is, a user's
46
+ privileges are not limited to their authentication database. By assigning
47
47
to the user roles in other databases, a user created in one database can
48
48
have permissions to act on other databases. For more information on
49
49
roles, see :doc:`/core/authorization`.
@@ -62,22 +62,7 @@ the user multiple times in different databases.
62
62
Authenticate a User
63
63
-------------------
64
64
65
- To authenticate a user, either
66
-
67
- - Use the command line authentication options (e.g. ``-u``, ``-p``,
68
- ``--authenticationDatabase``) when connecting to the :binary:`~bin.mongod` or
69
- :binary:`~bin.mongos` instance, or
70
-
71
- - Connect first to the :binary:`~bin.mongod` or :binary:`~bin.mongos` instance, and
72
- then run the :dbcommand:`authenticate` command or the :method:`db.auth()`
73
- method against the authentication database.
74
-
75
- To authenticate, the client must authenticate the user against the user's
76
- :ref:`authentication database <mongo-shell-authentication-options>`.
77
-
78
- For instance, if using the :binary:`~bin.mongo` shell as a client, you can
79
- specify the authentication database for the user with the
80
- ``--authenticationDatabase`` option.
65
+ .. include:: /includes/fact-authenticate.rst
81
66
82
67
Centralized User Data
83
68
---------------------
@@ -106,7 +91,7 @@ instance and add the users. Clients then authenticate these users through the
106
91
:binary:`~bin.mongos` instances.
107
92
108
93
.. versionchanged:: 2.6
109
-
94
+
110
95
MongoDB stores these sharded cluster user data in the ``admin`` database of
111
96
the :term:`config servers <config server>`. Previously, the credentials for
112
97
authenticating to a database on a sharded cluster resided on the
0 commit comments