From: Eugene Prokopiev <john@rmts.donpac.ru>
To: community@altlinux.ru
Subject: [Comm] OpenLDAP: единое дерево для разных сервисов
Date: Sat, 03 Apr 2004 18:37:47 +0400
Message-ID: <406ECC3B.7050808@rmts.donpac.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]
Здравствуйте!
Поднят openldap. bind и dhcpd берут из него свои настройки. Дерево ldap
выглядит примерно так (как его рисует gq, ldif в аттаче):
localhost
dc=myserver,dc=myprovider,dc=ru
ou=DNS
relativeDomainName=@
relativeDomainName=ns
relativeDomainName=mail
relativeDomainName=host1
relativeDomainName=host2
cn=DHCP Config
cn=192.168.1.0
cn=host1
cn=192.168.3.0
ch=host2
Возможно, в будущем появятся новые нестандартные сервисы, которые так
же, как bind и dhcpd, потребуют хранить какие-либо атрибуты хостов сети.
Самое главное, что мне не нравится - у каждого сервиса фактически
собственное изолированное от других дерево. Т.е. с заменой
конфигурационных файлов на LDAP мы меняем шило на мыло.
Ближайший аналог того, что мне хочется - технология XSLT. Т.е. имеем
основное дерево XML с той структурой, которая удобна мне (например, в
список атрибутов объекта хост входят одновременно dns-имя, ip-адрес,
mac-адрес). Только в это дерево можно вносить изменения. К этому дереву
можно применять XSLT-преобразования (для bind свое, для dhcpd свое и
т.д.) и получать на выходе деревья для каждого сервиса с необходимой для
этого сервиса структурой.
Как реализовать в openldap нечто подобное?
--
С уважением, Прокопьев Евгений
[-- Attachment #2: network.ldif --]
[-- Type: text/plain, Size: 3319 bytes --]
dn: dc=myserver, dc=myprovider, dc=ru
objectClass: top
objectClass: dhcpServer
objectClass: organizationalUnit
cn: myserver.myprovider.ru
dhcpServiceDN: cn=DHCP Config, dc=myserver, dc=myprovider, dc=ru
ou: DNS
dn: ou=DNS, dc=myserver, dc=myprovider, dc=ru
objectClass: top
objectClass: dNSZone
relativeDomainName: myserver.myprovider.ru
zoneName: myserver.myprovider.ru
dn: relativeDomainName=@, ou=DNS, dc=myserver, dc=myprovider, dc=ru
objectClass: top
objectClass: dNSZone
relativeDomainName: @
zoneName: myserver.myprovider.ru
sOARecord: ns.myserver.myprovider.ru. hostmaster.myserver.myprovider.ru. 2004040401 12H 1H 1W
1H
nSRecord: ns.myserver.myprovider.ru.
mXRecord: 10 mail.myserver.myprovider.ru.
dn: relativeDomainName=ns, ou=DNS, dc=myserver, dc=myprovider, dc=ru
objectClass: top
objectClass: dNSZone
relativeDomainName: ns
zoneName: myserver.myprovider.ru
dNSClass: IN
aRecord: 192.168.1.1
dn: relativeDomainName=mail, ou=DNS, dc=myserver, dc=myprovider, dc=ru
objectClass: top
objectClass: dNSZone
relativeDomainName: mail
zoneName: myserver.myprovider.ru
dNSClass: IN
aRecord: 192.168.1.1
dn: relativeDomainName=host1, ou=DNS, dc=myserver, dc=myprovider, dc=ru
objectClass: top
objectClass: dNSZone
relativeDomainName: host1
zoneName: myserver.myprovider.ru
dNSClass: IN
aRecord: 192.168.1.2
dn: relativeDomainName=host2, ou=DNS, dc=myserver, dc=myprovider, dc=ru
objectClass: top
objectClass: dNSZone
relativeDomainName: host2
zoneName: myserver.myprovider.ru
dNSClass: IN
aRecord: 192.168.3.4
dn: cn=DHCP Config, dc=myserver, dc=myprovider, dc=ru
cn: DHCP Config
objectClass: top
objectClass: dhcpService
dhcpPrimaryDN: cn=myserver.myprovider.ru, dc=myserver, dc=myprovider, dc=ru
dhcpStatements: ddns-update-style none
dn: cn=192.168.1.0, cn=DHCP Config, dc=myserver, dc=myprovider, dc=ru
cn: 192.168.1.0
objectClass: top
objectClass: dhcpSubnet
objectClass: dhcpOptions
dhcpNetMask: 24
dhcpRange: dynamic-bootp 192.168.1.128 192.168.1.255
dhcpStatements: default-lease-time 21600
dhcpStatements: max-lease-time 43200
dhcpOption: routers 192.168.1.1
dhcpOption: subnet-mask 255.255.255.0
dhcpOption: domain-name "myserver.myprovider.ru"
dhcpOption: domain-name-servers 192.168.1.1
dhcpOption: time-offset -5
dhcpOption: ntp-servers 192.168.1.1
dhcpOption: netbios-name-servers 192.168.1.1
dn: cn=host1, cn=192.168.1.0, cn=DHCP Config, dc=myserver, dc=myprovider, dc=ru
cn: host1
objectClass: top
objectClass: dhcpHost
dhcpHWAddress: ethernet 00:0C:29:84:99:6B
dhcpStatements: fixed-address 192.168.1.2
dn: cn=192.168.3.0, cn=DHCP Config, dc=myserver, dc=myprovider, dc=ru
cn: 192.168.3.0
objectClass: top
objectClass: dhcpSubnet
objectClass: dhcpOptions
dhcpNetMask: 24
dhcpRange: dynamic-bootp 192.168.3.128 192.168.3.255
dhcpStatements: default-lease-time 21600
dhcpStatements: max-lease-time 43200
dhcpOption: routers 192.168.3.1
dhcpOption: subnet-mask 255.255.255.0
dhcpOption: domain-name "myserver.myprovider.ru"
dhcpOption: domain-name-servers 192.168.1.1
dhcpOption: time-offset -5
dhcpOption: ntp-servers 192.168.1.1
dhcpOption: netbios-name-servers 192.168.1.1
dn: cn=host2, cn=192.168.3.0, cn=DHCP Config, dc=myserver, dc=myprovider, dc=ru
cn: host2
objectClass: top
objectClass: dhcpHost
dhcpHWAddress: ethernet 00:0C:29:84:99:5B
dhcpStatements: fixed-address 192.168.3.4
next reply other threads:[~2004-04-03 14:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-03 14:37 Eugene Prokopiev [this message]
2004-04-05 5:33 ` Eugene Prokopiev
2004-04-07 8:34 ` Pavel S. Khmelinsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=406ECC3B.7050808@rmts.donpac.ru \
--to=john@rmts.donpac.ru \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git