@@ -143,9 +143,14 @@ content: |
143143 its authentication mechanism. If selected, you must
144144 provide the :manual:`Principal </core/kerberos/#principals>`
145145 and :guilabel:`Service Name` to authenticate the user.
146- Leave the :guilabel:`Password` field blank.
146+
147+ .. important::
148+
149+ When authenticating with Kerberos, do not
150+ specify the :guilabel:`Password` in the connection
151+ form.
147152
148- You can also direct |compass| to
153+ You can direct |compass| to
149154 :guilabel:`Canonicalize the Host Name` by setting the
150155 corresponding toggle. When you enable this setting,
151156 Kerberos uses the canonicalized form of the
@@ -156,6 +161,55 @@ content: |
156161 canonicalization in Kerberos, see `this RFC document
157162 <https://tools.ietf.org/html/rfc6806.html>`__.
158163
164+ Authenticate as a Different Kerberos User on Windows
165+ When you authenticate with Kerberos on Windows, the
166+ :guilabel:`Principal` must be the same as the
167+ principal of the security context that
168+ |compass-short| is running. Normally, this is the
169+ logged-in user who is running |compass-short|.
170+
171+ To authenticate as a different Kerberos user, you can
172+ run |compass| as the desired user, and instead
173+ specify the :guilabel:`Principal` for that user.
174+
175+ To run |compass| as a different user, you can
176+ either:
177+
178+ - Hold :guilabel:`Shift` and right-click the
179+ |compass| program icon to select
180+ :guilabel:`Run as a different user`.
181+
182+ .. figure:: /images/compass/run-compass-as-user.png
183+ :figwidth: 500px
184+
185+ - Use the ``runas`` command-line tool.
186+
187+ .. example::
188+
189+ To run |compass| as a user named ``admin``:
190+
191+ .. code-block:: none
192+
193+ runas /profile /user:mymachine\admin <path to MongoDB Compass>
194+
195+ After you run |compass| as the desired user, to
196+ authenticate against your Kerberos-enabled MongoDB
197+ deployment, specify the :guilabel:`Principal` for the
198+ corresponding user.
199+
200+ .. important::
201+
202+ You must run |compass| as the user you wish to
203+ authenticate with. If you simply specify the
204+ desired user :guilabel:`Principal` without running
205+ |compass| as that user, authentication fails.
206+
207+ .. seealso::
208+
209+ To learn more about the ``runas`` command-line
210+ tool, see `Runas
211+ <https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771525(v=ws.11)>`__.
212+
159213 - id: ldap
160214 name: LDAP
161215 content: |
0 commit comments