Discussion:
[389-users] gecos syntax
Angel Bosch Mora
2021-05-12 13:02:46 UTC
Permalink
I'm testing a migration from 1.2.8 to latest version and I'm facing some problem while importing data:

ldap_add: Invalid syntax (21)
additional info: gecos: value #0 invalid per syntax

I understand that I'm using UTF8 data here (ÁLBA GARCÍA LÓPEZ) so I have two questions:

why old verions allows to fill that data if it's agains syntax?

is there any problem if I change syntax from

1.3.6.1.4.1.1466.115.121.1.26

to

1.3.6.1.4.1.1466.115.121.1.15

in my schemas?

thanks i advance,

abosch
-- Institut Mallorqui d'Afers Socials. Aquest missatge, i si escau, qualsevol fitxer annex, es dirigeix exclusivament a la persona que n'es destinataria i pot contenir informacio confidencial. En cap cas no heu de copiar aquest missatge ni lliurar-lo a terceres persones sense permis expres de l'IMAS. Si no sou la persona destinataria que s'hi indica (o la responsable de lliurar-l'hi) us demanam que ho notifiqueu immediatament a l'adreca electronica de la persona remitent. Abans d'imprimir aquest missatge, pensau si es realment necessari.
_______________________________________________
389-users mailing list -- 389-***@lists.fedoraproject.org
To unsubscribe send an email to 389-users-***@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/389-***@lists.fedoraproject.org
Do not reply to spam on the list,
William Brown
2021-05-13 00:01:19 UTC
Permalink
Post by Angel Bosch Mora
ldap_add: Invalid syntax (21)
additional info: gecos: value #0 invalid per syntax
why old verions allows to fill that data if it's agains syntax?
There were some changes to schema between 1.2 and 1.3 I seem to recall to make it a bit better enforced, but could you check if schema syntax is enforced in your cn=config?
Post by Angel Bosch Mora
is there any problem if I change syntax from
1.3.6.1.4.1.1466.115.121.1.26
to
1.3.6.1.4.1.1466.115.121.1.15
In theory its likely not an issue here (since utf8 is a superset of ia5), but in reality changing core schema like gecos is generally not a good idea beacuse it is hard for you to maintain that (since it's part of the rpms and will be upgraded and replaced). So it's likely to cause you more problems in the long run. (which is really unfortunate because schema historically in ldap is not considerate to other languages and cultures :( :( )

It's also unlikely we can change the rfc for gecos since the LDAP IETF group is effectively dead, and with little hope of revival.


I'd say your options are:

* Try to change the gecos schema, and to maintain that change forever
* optional; Submit an issue to 389-ds about changing it upstream, and we can discuss if we are willing to become rfc-divergent
* sanitise the data to be ia5 compliant IE remove accents etc.
* create a parallel schema like instituteGecos which is utf8 and migrate applications to use that

None of these options is really very attractive though I'm sorry :( It's a problematic situation for you I'm certain :(
Post by Angel Bosch Mora
in my schemas?
thanks i advance,
abosch
-- Institut Mallorqui d'Afers Socials. Aquest missatge, i si escau, qualsevol fitxer annex, es dirigeix exclusivament a la persona que n'es destinataria i pot contenir informacio confidencial. En cap cas no heu de copiar aquest missatge ni lliurar-lo a terceres persones sense permis expres de l'IMAS. Si no sou la persona destinataria que s'hi indica (o la responsable de lliurar-l'hi) us demanam que ho notifiqueu immediatament a l'adreca electronica de la persona remitent. Abans d'imprimir aquest missatge, pensau si es realment necessari.
_______________________________________________
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure

Sincerely,

William Brown

Senior Software Engineer, 389 Directory Server
SUSE Labs, Australia
_______________________________________________
389-users mailing list -- 389-***@lists.fedoraproject.org
To unsubscribe send an email to 389-users-***@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/389-***@lists.fedoraproject.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-infras
Angel Bosch Mora
2021-05-13 10:46:44 UTC
Permalink
Post by William Brown
* sanitise the data to be ia5 compliant IE remove accents etc.
I did just that and I leave it here in case anyone is facing same problem (it's a oneliner):

cat original-data.ldif | perl -pe 's,^gecos:.*,`echo -n "$&" | iconv -f utf-8 -t ascii//translit`,gei' > sanitized-data.ldif

in my server with 12656 entries and 456278 lines it takes 26 seconds to complete.

as always, thanks for your time.

abosch


-- Institut Mallorqui d'Afers Socials. Aquest missatge, i si escau, qualsevol fitxer annex, es dirigeix exclusivament a la persona que n'es destinataria i pot contenir informacio confidencial. En cap cas no heu de copiar aquest missatge ni lliurar-lo a terceres persones sense permis expres de l'IMAS. Si no sou la persona destinataria que s'hi indica (o la responsable de lliurar-l'hi) us demanam que ho notifiqueu immediatament a l'adreca electronica de la persona remitent. Abans d'imprimir aquest missatge, pensau si es realment necessari.
_______________________________________________
389-users mailing list -- 389-***@lists.fedoraproject.org
To unsubscribe send an email to 389-users-***@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/389-***@lists.fedoraproject.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastr
Loading...