From: max <alt@zlt.ru> To: Alt Alt <community@altlinux.ru> Subject: [Comm] настройка openldap Date: Fri, 18 Feb 2005 12:31:52 +0500 Message-ID: <200502181231.52970.alt@zlt.ru> (raw) При настройке пользовался пакетом документации из дистр-а Мастер 2.4, система таже. Цитирую: "Для начала настроим сервер: include /etc/openldap/schema/core.schema include /etc/openldap/schema/cosine.schema include /etc/openldap/schema/inetorgperson.schema include /etc/openldap/schema/misc.schema include /etc/openldap/schema/nis.schema include /etc/openldap/schema/openldap.schema pidfile /var/run/slapd.pid argsfile /var/run/slapd.args loglevel 512 database ldbm directory /var/lib/ldap/base/example.com password-hash {MD5} suffix "dc=example,dc=com" #rootdn "cn=admin,dc=example,dc=com" #rootpw secret access to attr=userPassword by dn=".*,ou=Admins,dc=example,dc=com" by anonymous auth by self write by * none access to * by * read index objectClass,uid,uidNumber,gidNumber eq index cn,mail,surname,givenname eq,sub После этого создадим пользователя ldap, от имени которого будет работать наш сервер и запустим процесс slapd следующей командой: # slapd -u ldap -h 'ldap://127.0.0.1/ ldap//ldap.example.com/ ldaps://ldap.example.com' Теперь можно создать базу данных — например, с помощью утилиты ldapadd или slapadd: # ldapadd -xWD cn=admin,ou=Admins,dc=example,dc=com -H ldaps://ldap.altlinux.ru -f initial.ldif или, если сервер не запущен: # slapadd -b dc=example,dc=com -l initial.ldif # chown ldap:ldap /var/lib/ldap/bases/example.com/* Содержимое файла initial.ldif будет такое: dn: dc=example,dc=com objectClass: top objectClass: organization o: Exapmle Inc. o: exapmle.com dn: ou=Admins,dc=example,dc=com objectClass: top objectClass: organizationalUnit ou: Admins description: Administrators dn: cn=admin,ou=Admins,dc=exapmle,dc=com objectClass: top objectClass: person cn: admin sn: Bender givenName: Ostap userPassword: secret description: Our smart admin dn: ou=People,dc=example,dc=com objectClass: top objectClass: organizationalUnit ou: People description: Stuff area dn: uid=obender,ou=People,dc=example,dc=com objectClass: top objectClass: account objectClass: posixAccount objectClass: shadowAccount objectClass: inetOrgPerson cn: Ostap Bender sn: Bender givenName: Ostap uid: obender uidNumber: 1000 gidNumber: 1000 homeDirectory: /home/obender loginShell: /bin/bash userPassword: {md5}$1$ION4SIII$EYyGEeYt4g2hEe9tjICac. mail: obender@example.com mail: obender@attiresandtoes.com .... dn: ou=Groups,dc=example,dc=com objectClass: top objectClass: organizationalUnit ou: Groups description: Groups of users dn: cn=obender,ou=Groups,dc=example,dc=com objectClass: top objectClass: posixGroup cn: luser gidNumber: 1000 description: Default group for users presented by LDAP" Всё зделал как написано, только в конфиг пришлось добавить: modulepath /usr/lib/openldap moduleload back_ldbm.la Иначе была ругань на неизветный ldbm. При старте через service, slapd стартует только на ldap://127.0.0.1 запускал так: slapd -u ldap -h 'ldap://127.0.0.1/ ldap//ldap.example.com/ ldaps://127.0.0.1' При выполнении # ldapadd -xWD cn=admin,ou=Admins,dc=example,dc=com -H ldap://127.0.0.1 -f initial.ldif спрашивает пароль, и какие бы я пароли туда не вводил ответ один: ldap_bind: Invalid credentials (49) при обращении к ldapS вылезает ошибка ldap_bind: Can't contact LDAP server (81) additional info: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure Если идти вторым путём, то после slapadd -b dc=example,dc=com -l initial.ldif получаю slapadd: could not open database Как вылечить можно? -- MaX
next reply other threads:[~2005-02-18 7:31 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-02-18 7:31 max [this message] 2005-02-18 8:36 ` Eugene Grudina 2005-02-24 6:56 ` [Comm] " max 2005-02-26 20:13 ` Pavel Usischev 2005-02-27 6:26 ` max 2005-02-27 16:38 ` Michael Shigorin 2005-02-23 15:42 ` Michael Shigorin
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=200502181231.52970.alt@zlt.ru \ --to=alt@zlt.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