Package: migrationtools
Version: 47-8
Severity: normal

Dear Maintainer,

When applying migrate_passwd.pl to text coded as UTF-8, the Base64-coded text 
for cn: or sn: is not correct. It appears then as non-UTF-8 text when decoded 
(as I found initially through phpldapadmin queries). But if I first recode 
the same text to Latin1, the Base64 coded text looks fine when decoded.

debian-version: 8.10
command line examples from UTF-8 charset terminal
Specific changes I had made to migrate_common.ph

        $EXTENDED_SCHEMA = 1;
        $USE_UTF8 = 1;
        $IGNORE_UID_BELOW = 1000;
        $IGNORE_GID_BELOW = 1000;
        $IGNORE_UID_ABOVE = 9999;
        $IGNORE_GID_ABOVE = 9999;
                $NAMINGCONTEXT{'passwd'}  = "ou=Usuarios";
                $NAMINGCONTEXT{'group'}   = "ou=Grupos";


Example:

# echo "jorgegp:x:5555:3333:Jorge Gómez Peña:/home/jorgegp:/bin/bash" | 
./migrate_passwd.pl -
dn: uid=jorgegp,ou=Usuarios,dc=dominio,dc=es
uid: jorgegp
cn:: Sm9yZ2UgR8ODwrNtZXogUGXDg8KxYQ==
givenName:: Sm9yZ2UgR8ODwrNtZXo=
sn:: UGXDg8KxYQ==
...etc...
gecos: Jorge Gomez Pena

# echo -n "Sm9yZ2UgR8ODwrNtZXogUGXDg8KxYQ=="|base64 -d; echo
Jorge Gómez Peña


Now, the same example but previously recoding to Latin1...


# echo "jorgegp:x:5555:3333:Jorge Gómez Peña:/home/jorgegp:/bin/bash" | recode 
utf8..latin1 | ./migrate_passwd.pl -
dn: uid=jorgegp,ou=Usuarios,dc=dominio,dc=es
uid: jorgegp
cn:: Sm9yZ2UgR8OzbWV6IFBlw7Fh
givenName:: Sm9yZ2UgR8OzbWV6
sn:: UGXDsWE=
...etc...
gecos: Jorge Gomez Pena

# echo -n "Sm9yZ2UgR8OzbWV6IFBlw7Fh"|base64 -d; echo
Jorge Gómez Peña



I have not found guides of use about conditions on infile encodings in 
changelog.Debian. 
May be I've missed them... If I haven't, it would be usefull to include at 
least a warning 
in  the README and/or in the man text.

Thanks for your work.

Fernando López 


-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8), 
LANGUAGE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages migrationtools depends on:
pn  openldap-utils  <none>
ii  perl            5.24.1-3+deb9u2

migrationtools recommends no packages.

Versions of packages migrationtools suggests:
pn  slapd  <none>

Reply via email to