LDAP uid with spaces

421 views
Skip to first unread message

Manuel Vacelet

unread,
Apr 9, 2013, 9:35:40 AM4/9/13
to repo-d...@googlegroups.com
Hi all,

ssh usernames cannot contains spaces.
Some LDAP are configured to have uid with spaces (I even know admins who set single quotes in uid...).

I read about accountSshUserName in documentation[1], it's about changing case or picking a part of an LDAP attribute.

It will not do the job in my case (I don't have attributes that could be used for that purpose). But what is available as transformations at configuration level ?
For instance I'd like to replace spaces (and quotes, no laugh) by underscore, is that possible ?

Shawn Pearce

unread,
Apr 9, 2013, 3:58:04 PM4/9/13
to Manuel Vacelet, repo-d...@googlegroups.com
On Tue, Apr 9, 2013 at 6:35 AM, Manuel Vacelet <manuel....@gmail.com> wrote:
> ssh usernames cannot contains spaces.
> Some LDAP are configured to have uid with spaces (I even know admins who set
> single quotes in uid...).
>
> I read about accountSshUserName in documentation[1], it's about changing
> case or picking a part of an LDAP attribute.
>
> It will not do the job in my case (I don't have attributes that could be
> used for that purpose). But what is available as transformations at
> configuration level ?
> For instance I'd like to replace spaces (and quotes, no laugh) by
> underscore, is that possible ?

Not supported because this has never been raised as an issue before. :-)

Manuel Vacelet

unread,
Apr 10, 2013, 2:54:30 AM4/10/13
to Shawn Pearce, repo-d...@googlegroups.com
Yeah, sometime $DAY_JOB and $CUSTOMER[] are enlightening :)

Anyway, shall I fill an issue in the bug tracker for that ?

Manuel
--
Twitter: @vaceletm

Shawn Pearce

unread,
Apr 10, 2013, 8:52:25 PM4/10/13
to Manuel Vacelet, repo-d...@googlegroups.com
Sure. Or better, send us a patch to Gerrit that supports what you want. :-)

Manuel Vacelet

unread,
Apr 11, 2013, 3:39:12 AM4/11/13
to Shawn Pearce, repo-d...@googlegroups.com
I'd love to but my Java skills are way behind what is required to contribute to Gerrit (I already tried to fix the case issue on authGroup in replication plugin, with no luck).

Manuel

--
Twitter: @vaceletm

Robin Rosenberg

unread,
Apr 13, 2013, 6:05:11 AM4/13/13
to Manuel Vacelet, repo-d...@googlegroups.com


----- Ursprungligt meddelande -----
> Hi all,
>
> ssh usernames cannot contains spaces.

I think this assertion is wrong. Both ssh and git using the
ssh protocol accept spaces in user names. Just quote them.

git clone "name with spaces"@server:path
ssh "name with spaces"@server
scp "name with spaces"@server:file

I did not try it with Gerrit though, just regular ssh and
Linux (RHEL) openssh 5.4. On OSX (mountain lion) scp did
not accept spaces, but ssh and git does.

Whether it's a good idea or not is another question...

-- robin

Manuel Vacelet

unread,
Apr 13, 2013, 6:27:15 AM4/13/13
to Robin Rosenberg, repo-d...@googlegroups.com
On Sat, Apr 13, 2013 at 12:05 PM, Robin Rosenberg <robin.r...@dewire.com> wrote:


----- Ursprungligt meddelande -----
> Hi all,
>
> ssh usernames cannot contains spaces.

I think this assertion is wrong. Both ssh and git using the
ssh protocol accept spaces in user names. Just quote them.


Agreed, I was talking about gerrit ssh usernames.


Reply all
Reply to author
Forward
0 new messages