Gerrit LDAP password

470 views
Skip to first unread message

fredrik....@volvocars.com

unread,
Feb 15, 2016, 8:56:06 AM2/15/16
to Repo and Gerrit Discussion
Hi,

I'm configuring a gerrit instance to interface an LDAP directory and I've hit a bump, shall we say.

The password for the user contains both a * and a ^ and this seems to be an issue in the configuration.
If I switch to a user without those characters in the password it works perfectly.

Unfortunanly I cannot change the password of the user I need to use, and in the production environment
users with trivial passwords don't exist (i.e. I can't switch user either.

Can I escape the password in the configuration file in some manner or is this just a plain old bug?

Thanks
Fredrik

Steffen Gebert

unread,
Feb 15, 2016, 9:49:45 AM2/15/16
to fredrik....@volvocars.com, Repo and Gerrit Discussion
Hi Fredrik,

have you tried to use quotes?

[foo]
password = "123^*$"

Steffen
> --
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Elestedt, Fredrik

unread,
Feb 15, 2016, 10:55:05 AM2/15/16
to Steffen Gebert, Repo and Gerrit Discussion
Hi,

Yes, I did - and unfortunantly it makes no difference.
I did however verify that quotation marks do not affect the simple password - they are stripped off it seems.

// Fredrik

Saša Živkov

unread,
Feb 15, 2016, 11:43:38 AM2/15/16
to fredrik....@volvocars.com, Repo and Gerrit Discussion
This might be a bug in JNDI. Maybe some of these special characters are not properly escaped
in the LDAP protocol and thus corrupt the protocol.

I would try escaping each of these characters with a backslash. Since git config eats one level
of back slashes you will need to add two. For example if your password it A*B put the
following in your config:

[ldap]
  password = A\\*B

Did it help?

Elestedt, Fredrik

unread,
Feb 15, 2016, 12:19:09 PM2/15/16
to Saša Živkov, Repo and Gerrit Discussion

Hi,

 

Unfortunantly not, still same issue. I tried using a single bashslash as well, only resulted in “fatal: bad config file”

 

// Fredrik

 

From: Saša Živkov [mailto:ziv...@gmail.com]
Sent: den 15 februari 2016 17:43
To: Elestedt, Fredrik
Cc: Repo and Gerrit Discussion
Subject: Re: Gerrit LDAP password

 

 

 

On Mon, Feb 15, 2016 at 2:56 PM, <fredrik....@volvocars.com> wrote:

Dean Wheatley

unread,
Oct 14, 2017, 10:30:17 PM10/14/17
to Repo and Gerrit Discussion
For anyone else having this similar issue, wrapping the ldap password with double-quotes is required if your password has "special" characters like @ and # (tested on v2.12.7). For example:

[ldap]

        password = "abc@#"


 

Thanks

Fredrik

--
--
To unsubscribe, email repo-discus...@googlegroups.com

David Ostrovsky

unread,
Oct 15, 2017, 3:36:39 AM10/15/17
to Repo and Gerrit Discussion

On Sunday, October 15, 2017 at 4:30:17 AM UTC+2, Dean Wheatley wrote:
For anyone else having this similar issue, wrapping the ldap password with double-quotes is required if your password has "special" characters like @ and # (tested on v2.12.7). For example:

[ldap]

        password = "abc@#"


Thanks, there is even this issue exactly for that use case: [1].

Reply all
Reply to author
Forward
0 new messages