[Samba] Problem with account with bad character

mathias dufresne infractory at gmail.com
Tue Sep 15 11:43:41 UTC 2015


First sorry for previous message.

You could remove displayName indexing as it seems the main issue (ERR:
(Other) "Failed to create index key for attribute 'displayName':Unknown
error").

This needs to modify the AD schema, which is not advised.

If you want to do it anyway:
On DC having the issue (it's the responsible of schema modification I
believe)
ldbedit -H $sam -b 'CN=SCHEMA,CN=CONFIGURATION,DC=DOMAIN,DC=TLD'
'(cn=display-name)' --option="dsdb:schema update allowed"=true

Then change the "searchFlags" attribute to set it to "0".

Restart your samba, try to modify your user.


2015-09-15 13:11 GMT+02:00 Stéphane PURNELLE <stephane.purnelle at corman.be>:

> /usr/local/samba/bin/ldbmodify
> --url=/srv/samba/private/sam.ldb  /home/secoper/modify_users.ldif -U
> Administrator
> ldb_handler_fold: unable to casefold string [Val�rie Dubois]
> ERR: (Other) "Failed to create index key for attribute
> 'displayName':Unknown error" on DN
> CN=vdu,CN=Users,DC=cormandom,DC=int-corman,DC=be at block before line 4
> Modify failed after processing 0 records
>
> Content of my ldif :
>
> dn: CN=vdu,CN=Users,DC=cormandom,DC=int-corman,DC=be
> changetype: modify
> replace: displayName
> displayName: must_be_deleted
>
>
> regards
>
>         Stéphane Purnelle
>
> "samba" <samba-bounces at lists.samba.org> a écrit sur 15/09/2015 12:56:14 :
>
> > De : Rowland Penny <rowlandpenny241155 at gmail.com>
> > A : samba at lists.samba.org,
> > Date : 15/09/2015 13:00
> > Objet : Re: [Samba] Problem with account with bad character
> > Envoyé par : "samba" <samba-bounces at lists.samba.org>
> >
> > On 15/09/15 11:34, Stéphane PURNELLE wrote:
> > > Hi,
> > >
> > > Same problem with apache studio directory
> > >
> > > !ERROR [LDAP: error code 80 - failed to create index key for attribute
> > > 'displayName':Unknow error.
> > >
> > > regards
> > >
> > >    Stéphane Purnelle
> > >
> > > "samba" <samba-bounces at lists.samba.org> a écrit sur 15/09/2015
> 09:57:18 :
> > >
> > >> De : L.P.H. van Belle <belle at bazuin.nl>
> > >> A : samba at lists.samba.org <samba at lists.samba.org>,
> > >> Date : 15/09/2015 10:01
> > >> Objet : Re: [Samba] Problem with account with bad character
> > >> Envoyé par : "samba" <samba-bounces at lists.samba.org>
> > >>
> > >> You can try it with the apache studio directory
> > >> https://directory.apache.org/studio/
> > >> its free, and very Handy.
> > >>
> > >> Greetz,
> > >>
> > >> Louis
> > >>
> > >>
> > >>> -----Oorspronkelijk bericht-----
> > >>> Van: samba [mailto:samba-bounces at lists.samba.org] Namens Stéphane
> > > PURNELLE
> > >>> Verzonden: dinsdag 15 september 2015 9:19
> > >>> Aan: Marc Muehlfeld
> > >>> CC: samba at lists.samba.org
> > >>> Onderwerp: Re: [Samba] Problem with account with bad character
> > >>>
> > >>>
> > >>> Hi,
> > >>>
> > >>> This command not work because displayName is bad encoded.
> > >>>
> > >>>   /usr/local/samba/bin/ldbdel -H /srv/samba/private/sam.ldb
> > >>> 'CN=vdu,CN=Users,DC=cormandom,DC=int-corman,DC=be'
> > >>> ldb_handler_fold: unable to casefold string [Valrie Dubois]
> > >>> delete of 'CN=vdu,CN=Users,DC=cormandom,DC=int-corman,DC=be' failed -
> > >>> (Operations error) replmd_delete: Failed to modify object
> > >>> CN=vdu,CN=Users,DC=cormandom,DC=int-corman,DC=be in delete -
> attribute
> > >>> 'displayName': no such attribute for delete on
> > >>> 'CN=vdu,CN=Users,DC=cormandom,DC=int-corman,DC=be'
> > >>>
> > >>>
> > >>> regards
> > >>>
> > >>>     Stéphane
> > >>>
> > >>> Marc Muehlfeld <mmuehlfeld at samba.org> a écrit sur 15/09/2015
> 07:53:48 :
> > >>>
> > >>>> De : Marc Muehlfeld <mmuehlfeld at samba.org>
> > >>>> A : Stéphane PURNELLE <stephane.purnelle at corman.be>,
> > >>>> Cc : samba at lists.samba.org
> > >>>> Date : 15/09/2015 07:53
> > >>>> Objet : Re: [Samba] Problem with account with bad character
> > >>>>
> > >>>> Am 14.09.2015 um 22:58 schrieb Stéphane PURNELLE:
> > >>>>> /usr/local/samba/bin/ldbedit -H /srv/samba/private/sam.ldb 'cn=vdu'
> > >>>>> ldb_handler_fold: unable to casefold string [Valérie Dubois]
> > >>>>> failed to modify CN=vdu,CN=Users,DC=cormandom,DC=int-corman,DC=be -
> > >>> Failed
> > >>>>> to create index key for attribute 'displayName':Unknown error
> > >>>>>
> > >>>>> I looked about ldbdel, but I don't find an example.and I already
> > >>> tryied
> > >>> to
> > >>>>> remove with aduc without sucess.
> > >>>> # ldbdel -H /usr/local/samba/private/sam.ldb
> > >>>> 'CN=demo03,CN=Users,DC=samdom,DC=example,DC=com'
> > >>>>
> > >>>>
> > >>>> BTW: Here's a good LDB introduction:
> > >>>> https://wiki.samba.org/index.php/LDB
> > >>>>
> > >>>>
> > >>>> Regards,
> > >>>> Marc
> > >>> --
> > >>> To unsubscribe from this list go to the following URL and read the
> > >>> instructions:  https://lists.samba.org/mailman/options/samba
> > >>
> > >>
> > >> --
> > >> To unsubscribe from this list go to the following URL and read the
> > >> instructions:  https://lists.samba.org/mailman/options/samba
> >
> > How about trying ldbmodify, but instead of trying to delete the
> > attribute, use 'replace' instead
> >
> > dn: <objects dn>
> > changetype: modify
> > replace: displayName
> > displayName: <whatever you want>
> >
> > Save this an ldif somewhere
> >
> > And then 'ldbmodify --url=/var/lib/samba/private/sam.ldb
> > /path/to/your_ldif -U Administrator'
> >
> > Rowland
> >
> > --
> > To unsubscribe from this list go to the following URL and read the
> > instructions:  https://lists.samba.org/mailman/options/samba
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>


More information about the samba mailing list