Главная страница


ru.unix

 
 - RU.UNIX ----------------------------------------------------------------------
 From : Alexander Lunyov                     2:5059/20.5    25 Feb 2004  22:19:16
 To : Victor Sudakov
 Subject : openldap, TheBat, русский язык
 -------------------------------------------------------------------------------- 
 
  * hi
  ** Victor Sudakov => Alexander Lunyov
 
 >>> В 1.x можно было в конце концов вообще поставить "schemacheck off" и
 >>> писать в entries что в голову взбредёт.
 >> В 2.1.х можно поставить то же самое.
 > В man slapd.conf не нашел. Ткни пальцем, пожалуйста.
 
     В мане нету, но опция работает.
 
 >>> Вот ты бы "сделал доп. objectclass" - а OID откуда бы взял?
 >> В IANA. Hичего страшного в этом нет, я получил OID на своё предприятие
 >> за полтора дня.
 > Тут мне подсказывают, что есть приватные.
 
     Слушай, ну вот скажи, тебе трудно на сайт IANA залезть, да? :)
 
 > Hепременно нужно dn с "o=COMPANY, c=RU", потому что у всех пользователей
 > стоит именно такой search base.
 
     Это не критично, я-то пробовал на своей базе. Принцип тот же.
 
 > Так вот, ldapadd ругается
 
 > adding new entry "uid=sudakov, o=SIBPTUS, c=RU"
 > ldapadd: update failed: uid=sudakov, o=SIBPTUS, c=RU
 > ldap_add: Object class violation (65)
 >         additional info: attribute 'c' not allowed
 
 > Изучение *.schema показало, что классу inetOrgPerson атрибут "c" вроде
 > как действительно не положен (его нет в MAY для данного класса и
 > родительских классов).
 
 > Тупо добавить в запись "objectclass: country" тоже не помогло:
 
 > ldap_add: Object class violation (65)
 >         additional info: invalid structural object class chain
 > (inetOrgPerson/country)
 
     А вот от этой ошибки тебя спасет schemacheck off или написание своей
 собственной схемы. Кстати да, если ты заметил, с параметром schemacheck off мне
 позволилось добавить entry, совершенно не коррелирующую с объявленными в ней
 классами (атрибут 'c' не входит ни в top, ни в inetOrgPerson).
 
     Однако вот мои эксперименты с тестовым LDIF'ом:
 
 ==============================================
 dn: cn=newinetorgperson, dc=domain,dc=ru
 objectclass: country
 objectclass: inetOrgPerson
 sn: newinetorgperson
 cn: newinetorgperson
 o: org
 c: RU
 mail: some@mail.mail
 uid: some
 ==============================================
 
 =======================================================================
 
 >здесь в slapd.conf переменная 'schemacheck off' закомментирована
 
 helios@root [20:58:00] /usr/local/etc/openldap # ldapadd -x -D
 cn=root,dc=domain,dc=ru -W -f test.ldif
 Enter LDAP Password:
 adding new entry "cn=newinetorgperson, dc=domain,dc=ru"
 ldapadd: update failed: cn=newinetorgperson, dc=domain,dc=ru
 ldap_add: Object class violation (65)
         additional info: invalid structural object class chain(country/inetOrgP
 erson)
 
 >а здесь я её раскомментировал и передернул slapd
 
 helios@root [20:58:53] /usr/local/etc/openldap # ldapadd -x -D
 cn=root,dc=domain,dc=ru -W -f test.ldif
 Enter LDAP Password:
 adding new entry "cn=newinetorgperson, dc=domain,dc=ru"
 
 helios@root [20:59:26] /usr/local/etc/openldap #
 =======================================================================
 
     Ошибка возникает из-за того, что класс country структурно (structural,
 смотри определения классов в файлах схем) подтягивает класс top, и тот же класс
 top также (structural) подтягивается в inetOrgPerson (через
 organizationalPerson, если точнее). То есть получается
 
          top
         /   \
 country      organizationalPerson
                  \
                   inetOrgPerson
 
     А одна конкретная entry может содержать классы (и атрибуты классов) только
 одной цепочки структурно зависимых классов (если я всё правильно понял).
 
     Именно поэтому я рисовал свою схему - inetOrgPerson не ужился с
 radiusProfile. В общем, это не очень сложно, просто надо читать и писать
 аккуратно.
 
     Кстати, про аккуратно читать. Виктор, ошибка "invalid structural object
 class chain" подробно описана в FAQ'е проекта OpenLDAP. Hа всякий случай, опять
 же, если инет есть только у меня (кстати, это первая же ссылка в гугле на тему
 'openldap invalid structural object class chain'):
 
 ==============================================================================
 
 >Problems with structural objectclasses
 
 A common error that is encountered when upgrading from earlier versions of
 OpenLDAP is 'invalid structural object class chain'. This occurs because 2.1.x
 versions enforce more of the LDAP structure rules than 2.0.x did, and many
 directories contain incorrect data because of the lax checking of the earlier
 versions.
 
 This particular error refers to the rule about STRUCTURAL objectclasses, which
 states that an entry may only use one chain of STRUCTURAL classes. Thus, it is
 OK for an entry to use the classes inetOrgPerson organizationalPerson and person
 because they inherit one from another to form a single chain. On the other hand,
 it is not possible to use inetOrgPerson and account in the same entry as account
 inherits directly from top and is not part of the same chain of classes as
 inetOrgPerson.
 
 >Solving the problem
 
 It may be tempting to re-label one of the problematic objectclasses as
 AUXILIARY. Please don't do that! You would be re-defining things that other
 people have made assumptions about, which is a good way of storing up trouble
 for the future.
 
 The right solution is to remove one of the offending objectclasses from your
 entries and (if necessary) replace it with one that does not conflict. You may
 be able to find another objectclass in the standard set that would do the job -
 perhaps using posixAccount in place of account. Alternatively, you will need to
 define an objectclass of your own that allows the attributes that you need.
 
 >An example of a new objectclass
 
 Suppose we need to include uid and mail in some entries but their existing
 objectclasses do not permit this. One solution would be to define a class like
 this:
 
     objectclass ( 1.2.826.0.1.9999998854.0.1.0.1
         NAME 'widgetCorpAccount'
         DESC 'Account in the Widget Corporation'
         SUP top AUXILIARY
         MAY     ( uid $ mail ) )
 
 Note that this is an AUXILIARY class so it will not conflict with any others.
 Note also that the OID (1.2.826.0.1.9999998854.0.1.0.1 in this case) must be
 globally unique. You should get an officially allocated OID prefix for your
 organisation and define your own OIDs under it.
 
 Now, by adding objectclass: widgetCorpAccount to your entries you will be able
 to add mail and uid attributes.
 ==============================================================================
 
  * bye
 
 ---
  * Origin: no sex until marriage! (c) Front242 (2:5059/20.5)
 
 

Вернуться к списку тем, сортированных по: возрастание даты  уменьшение даты  тема  автор 

 Тема:    Автор:    Дата:  
 Re: openldap, TheBat, русский язык   Victor Sudakov   18 Feb 2004 15:54:00 
 Re: openldap, TheBat, русский язык   Slava Astashonok   18 Feb 2004 17:09:13 
 Re: openldap, TheBat, русский язык   Victor Sudakov   18 Feb 2004 19:35:22 
 Re: openldap, TheBat, русский язык   Slava Astashonok   18 Feb 2004 20:02:30 
 Re: openldap, TheBat, русский язык   Victor Sudakov   19 Feb 2004 08:50:56 
 Re: openldap, TheBat, русский язык   Slava Astashonok   19 Feb 2004 10:28:42 
 openldap, TheBat, русский язык   Alexander Lunyov   18 Feb 2004 20:20:08 
 Re: openldap, TheBat, русский язык   Victor Sudakov   19 Feb 2004 09:16:47 
 Re: openldap, TheBat, русский язык   Andrew Filonov   19 Feb 2004 10:02:37 
 Re: openldap, TheBat, русский язык   Slava Astashonok   19 Feb 2004 10:18:31 
 Re: openldap, TheBat, русский язык   Constantin Stefanov   19 Feb 2004 12:47:23 
 Re: openldap, TheBat, русский язык   Peter V. Chernikoff   20 Feb 2004 13:41:35 
 Re: openldap, TheBat, русский язык   Spartak Radchenko   20 Feb 2004 14:09:09 
 Re: openldap, TheBat, русский язык   Peter V. Chernikoff   29 Feb 2004 23:33:06 
 openldap, TheBat, русский язык   Alexander Lunyov   19 Feb 2004 18:36:02 
 Re: openldap, TheBat, русский язык   Victor Sudakov   20 Feb 2004 08:22:51 
 openldap, TheBat, русский язык   Alexander Lunyov   20 Feb 2004 19:33:54 
 openldap, TheBat, русский язык   Alexander Lunyov   19 Feb 2004 18:08:12 
 Re: openldap, TheBat, русский язык   Igor Ivanov   19 Feb 2004 19:52:01 
 openldap, TheBat, русский язык   Alexander Lunyov   19 Feb 2004 22:27:02 
 Re: openldap, TheBat, русский язык   Victor Sudakov   20 Feb 2004 08:28:24 
 openldap, TheBat, русский язык   Alexander Lunyov   20 Feb 2004 17:42:50 
 Re: openldap, TheBat, русский язык   Victor Sudakov   21 Feb 2004 10:43:02 
 openldap, TheBat, русский язык   Alexander Lunyov   24 Feb 2004 09:02:58 
 Re: openldap, TheBat, русский язык   Vasily Krysin   20 Feb 2004 00:02:42 
 openldap, TheBat, русский язык   Alexander Lunyov   20 Feb 2004 22:05:02 
 Re: openldap, TheBat, русский язык   Victor Sudakov   21 Feb 2004 10:38:26 
 openldap, TheBat, русский язык   Alexander Lunyov   24 Feb 2004 10:06:14 
 Re: openldap, TheBat, русский язык   Victor Sudakov   24 Feb 2004 19:04:53 
 Re: openldap, TheBat, русский язык   Constantin Stefanov   24 Feb 2004 19:12:17 
 Re: openldap, TheBat, русский язык   Victor Sudakov   24 Feb 2004 20:42:57 
 Re: openldap, TheBat, русский язык   Constantin Stefanov   25 Feb 2004 14:10:24 
 Re: openldap, TheBat, русский язык   Victor Sudakov   25 Feb 2004 15:32:30 
 Re: openldap, TheBat, русский язык   Constantin Stefanov   25 Feb 2004 16:29:52 
 Re: openldap, TheBat, русский язык   Victor Sudakov   25 Feb 2004 18:47:40 
 openldap, TheBat, русский язык   Alexander Lunyov   25 Feb 2004 16:07:06 
 Re: openldap, TheBat, русский язык   Victor Sudakov   25 Feb 2004 18:47:36 
 openldap, TheBat, русский язык   Alexander Lunyov   25 Feb 2004 22:19:16 
 Re: openldap, TheBat, русский язык   Ilyak Kaznacheev   25 Feb 2004 23:16:09 
 Re: openldap, TheBat, русский язык   Victor Sudakov   26 Feb 2004 07:24:56 
 openldap, TheBat, русский язык   Alexander Lunyov   26 Feb 2004 09:44:34 
 Re: openldap, TheBat, русский язык   Ilyak Kaznacheev   26 Feb 2004 11:23:44 
 Re: openldap, TheBat, русский язык   Victor Sudakov   26 Feb 2004 13:10:30 
 Re: openldap, TheBat, русский язык   Slava Astashonok   26 Feb 2004 12:25:58 
 Re: openldap, TheBat, русский язык   Constantin Stefanov   26 Feb 2004 11:40:23 
 Re: openldap, TheBat, русский язык   Victor Sudakov   29 Feb 2004 15:05:38 
 Re: openldap, TheBat, русский язык   Slava Astashonok   26 Feb 2004 12:40:43 
 openldap, TheBat, русский язык   Alexander Lunyov   25 Feb 2004 00:06:24 
 Re: openldap, TheBat, русский язык   Serg Oskin   22 Feb 2004 02:17:30 
 openldap, TheBat, русский язык   Alexander Lunyov   24 Feb 2004 09:19:36 
 Re: openldap, TheBat, русский язык   Serg Oskin   24 Feb 2004 11:59:38 
Архивное /ru.unix/2765403ce729.html, оценка 2 из 5, голосов 10
Яндекс.Метрика
Valid HTML 4.01 Transitional