Strange behaviour if usernames contain certain characters

NethServer release 7.6.1810 (final)
Kernel release: 3.10.0-957.12.2.el7.x86_64

A few days ago i tried to change a username (the full name of a AD user) in the httpd-admin panel and has made a typo. The typo was the “-” in front of the “Name” and i have saved this without noting this typo. The result was a new Name like “/usr/libexec/openssh/sftp-server” in the Name field.
I think this is not the desired behavior of nethserver and maybe a bigger problem in the back?

Rre-changing the Name was no problem, but maybe someone can check it out.

Regards
yummiweb

3 Likes

Confirmed.

This does not affect the “Remote SSH” setting in any way. I tested with phpldapadmin.

I assume the “-” breaks the field numbering in a way and writes the shell to givenName and displayName fields in LDAP but I can’t locate it in the code.

2 Likes

Hi @yummiweb,

welcome to the NethServer Community! Many thank you for your bug report!

I just filed a new bug for this:

https://github.com/NethServer/dev/issues/5764

As it’s reproducible with both Nethgui and Cockpit, and despite the accounts provider type I guess the bug is in the nethserver-sssd code.

Apart from that, a person name starting with a symbol could not be accepted by the validator… :thinking:

2 Likes

There’s a bug fix to test! Run the following command and check the entered Name value is assigned to the user:

yum --enablerepo=nethserver-testing update nethserver-lib

To revert

yum --noplugins downgrade nethserver-lib

Patch here: https://github.com/NethServer/nethserver-lib/pull/17

2 Likes

It works in Nethgui and Cockpit. :+1:

2 Likes

Thank you @mrmarkuz, the fix was released!

2 Likes