# New MongoDB Shell (mongosh) does not authenticate to Percona MongoDB server using LDAP

**URL:** <https://forums.percona.com/t/new-mongodb-shell-mongosh-does-not-authenticate-to-percona-mongodb-server-using-ldap/11700>\
**Category:** Percona Server for MongoDB\
**Tags:** percona, mongodb\
**Created:** [August 9, 2021, 4:35pm UTC](https://forums.percona.com/t/new-mongodb-shell-mongosh-does-not-authenticate-to-percona-mongodb-server-using-ldap/11700 "2021-08-09T16:35:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronascentes](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@ronascentes](https://forums.percona.com/u/ronascentes)\
**Post date:** [August 9, 2021, 4:35pm UTC](https://forums.percona.com/t/new-mongodb-shell-mongosh-does-not-authenticate-to-percona-mongodb-server-using-ldap/11700/1 "2021-08-09T16:35:49Z")

</div>

The [new MongoDB Shell]( [MongoDB Shell (mongosh) — MongoDB Shell](https://docs.mongodb.com/mongodb-shell/) does not work or authenticate to Percona MongoDB server using LDAP

`mongosh --username <user_name> --password --authenticationDatabase '$external' --authenticationMechanism PLAIN --host percona.mongodb01.com --port 28015`

But the same command works fine to connect to Enterprise MongoDB instance. So do you know if anything should be done in my Percona MongoDB installation in order to allow LDAP authentication using mongosh?

---

<div class="post-metadata">

**Author:** ![ronascentes](https://avatars.discourse-cdn.com/v4/letter/r/da6949/32.png) [@ronascentes](https://forums.percona.com/u/ronascentes)\
**Post date:** [August 9, 2021, 5:01pm UTC](https://forums.percona.com/t/new-mongodb-shell-mongosh-does-not-authenticate-to-percona-mongodb-server-using-ldap/11700/2 "2021-08-09T17:01:44Z")

</div>

I just saw there is already a report bug about this issue [[PSMDB-677] mongosh cannot authenticate LDAP user - Percona JIRA](https://jira.percona.com/browse/PSMDB-677)

---

<div class="post-metadata">

**Author:** ![Alex\_Miroshnychenko](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/alex_miroshnychenko/32/2621_2.png) [@Alex\_Miroshnychenko](https://forums.percona.com/u/Alex_Miroshnychenko)\
**Post date:** [September 24, 2021, 11:14am UTC](https://forums.percona.com/t/new-mongodb-shell-mongosh-does-not-authenticate-to-percona-mongodb-server-using-ldap/11700/3 "2021-09-24T11:14:44Z")

</div>

Hi @ronascentes,

The issue has already been fixed in recent Percona Server for MongoDB releases.  
Just for your info: there was an issue with cyrus-sasl-plain dependency package on RPM-based systems which is also fixed in recent releases [Percona Server for MongoDB 4.4 release notes](https://www.percona.com/doc/percona-server-for-mongodb/LATEST/release_notes/4.4.8-9.html), so now it is installed along with Percona Server for MongoDB packages.
