Editing
Openldap
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
openLDAP is een open source implementatie van de LDAP standaard. De openLDAP implementatie is onder Squeeze ingrijpend gewijzigd ten opzichte van eerdere versies van de Debian implementatie. * TLS in plaats van openSSL * syncrepl in plaats van updateref, het provider consumer model * Gebruik van een soort slap.d database inplaats van /etc/ldap/slapd.conf = Opzet openldap configuratie = De gebruikelijke configuratie met slapd.conf is verleden tijd, het mag nog wel, maar deze methode is depricated. De nieuwe manier van configureren werkt met een dynamische ldif structuur. == Secure openldap == Het openldap project is overgegaan op TLS, maar Webhuis gebruikt de certificaten die met openssl zijn aangemaakt. === Testen van de configuratie === <pre> ldapsearch localhost ldapsearch lokaal op IP adres ldapsearch remote op IP adres </pre> === Secrets === Raar maar waar uit de documentatie blijkt: * ldap.conf passd staat in libnss-ldap.secret * libnss-ldap.conf passwd staat in ldap.secret * pam_ldap.conf passwd staat in ldap.secret === Tooling === Phpldapadmin is een eenvoudig webbased ldap tool.</br> Bij Squeeze is een onhebbelijkheid in de configuratie geslopen, phpldapadmin vraagt bij elke actie een template te kiezen. Zet dit uit door in /etc/phpldapadmin/config.php de parameter: <pre> // $config->custom->appearance['custom_templates_only'] = false; te wijzigen in: $config->custom->appearance['custom_templates_only'] = true; </pre> = Provider = Opzeten Provider (Master) voor meerdere domeinen.<br/> OpenLDAP is in de nieuwe opzet veel flexibeler dan voorheen, waardoor het mogelijk is om de replicatie vanuit verschillende bronnen te laten plaatsvinden. Een traditionele "slave" kan zo voor bepaalde attributen wijzigingen accepteren en die doorgeven aan de Master.<br/> Voorbeelden: * PTR records van machines in een subnet * Password wijzigingen door gebruikers == Multple domains == openLDAP maakt gebruik van de cn=config methode van configureren, de methode met slapd.conf is depricated. Bijna alle documentatie in de Administrator guide baseert zich echter nog op de oude methode met slapd.conf. Met name de ondersteuning van meerdere domains in de configuratie met de cn=config methode is anno 2011 nog moeilijk vast te stellen. Onder staat de listing van /etc/ldap/slapd.d/cn=config. <pre> drwxr-x--- 2 openldap openldap 4096 Apr 24 12:44 cn=schema drwxr-x--- 2 openldap openldap 4096 Apr 25 13:00 olcDatabase={1}bdb drwxr-x--- 2 openldap openldap 4096 Sep 21 21:17 olcDatabase={2}bdb -rw------- 1 openldap openldap 392 Apr 24 12:44 cn=module{0}.ldif -rw------- 1 openldap openldap 36830 Apr 24 12:44 cn=schema.ldif -rw------- 1 openldap openldap 525 Apr 24 12:44 olcDatabase={-1}frontend.ldif -rw------- 1 openldap openldap 513 Apr 24 12:44 olcDatabase={0}config.ldif -rw------- 1 openldap openldap 4652 Sep 23 00:13 olcDatabase={1}bdb.ldif -rw------- 1 openldap openldap 4664 Sep 21 21:14 olcDatabase={2}bdb.ldif </pre> Proefondervindelijk heeft Webhuis vastgesteld dat er naast een Database-bdb.ldif bestand tevens een Database-bdb directory aanwezig moete zijn. <pre> slapadd -n 1 -l /usr/local/src/samba-ldap/init-base.ldif slapadd -n 1 -l /usr/local/src/samba-ldap/ldap-populate.ldif slapadd -n 2 -l /usr/local/src/samba-ldap/wbhs-m.webhuis.nl.ldif </pre> = Consumer = == Replicatie tussen provider en consumer == = Server (slapd) configuratie = gnutls-cli -s uwork-p.uwork.nl -p 636 gnutls-cli -s uwork-p.uwork.nl -p 636 in een ander venster pkill -ALRM gnutls-cli = Client (ldap) configuratie = Stapsgewijs beschikbaar maken van de LDAP directory voor meerdere doeleinden en op meerdere plaatsen. Een aardig inzicht in de opzet geeft: * http://vuksan.com/linux/LDAP_authentication_under_Linux.html == ldap.conf == De ldap client configuratie is vrij eenvoudig: <pre> uri ldap://ldap1.cs.school.edu/ ldap://ldap2.cs.school.edu base dc=cs,dc=school,dc=edu ldap_version 3 ssl start_tls TLS_CACERT /etc/ldap/ssl/cacert.pem nss_base_netgroup cn=netgroup,dc=cs,dc=school,dc=edu?one </pre> Het volgende maakt het op client niveau allemaal stukken eenvoudiger: <pre> rm -f /etc/libnss-ldap.conf rm -f /etc/pam_ldap.conf ln -s /etc/ldap/ldap.conf /etc/libnss-ldap.conf ln -s /etc/ldap/ldap.conf /etc/pam_ldap.conf </pre> == pam.d == common-account <pre> account [success=2 new_authtok_reqd=done default=ignore] pam_unix.so account [success=1 default=ignore] pam_ldap.so account requisite pam_deny.so account required pam_permit.so </pre> common-auth <pre> auth [success=2 default=ignore] pam_unix.so nullok_secure try_first_pass auth [success=1 default=ignore] pam_ldap.so use_first_pass auth requisite pam_deny.so auth required pam_permit.so </pre> common-password <pre> password [success=2 default=ignore] pam_unix.so obscure ssha # sha512 password [success=1 user_unknown=ignore default=die] pam_ldap.so use_authtok try_first_pass ssha password requisite pam_deny.so password required pam_permit.so </pre> common-session<br/> In de laatste regel van deze snippet zorgt het systeem ervoor dat de directory /home aanwezig is. <pre> session [default=1] pam_permit.so session requisite pam_deny.so session required pam_permit.so session required pam_unix.so session optional pam_ldap.so session required pam_mkhomedir.so skel=/etc/skel umask=0022 </pre> common-session-noninteractive <pre> session [default=1] pam_permit.so session requisite pam_deny.so session required pam_permit.so session required pam_unix.so session optional pam_ldap.so # end of pam-auth-update config </pre> == nfs == * http://damstux.free.fr/wiki/index.php?title=Autofs%2C_LDAP_et_NFS <pre> dn: cn={6}autofs objectClass: olcSchemaConfig cn: {6}autofs olcAttributetypes: {0}( 1.3.6.1.1.1.1.25 NAME 'automountInformation' DESC 'Information used by the autofs automounter' EQUALITY caseExactIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) olcObjectClasses: {1}( 1.3.6.1.1.1.1.13 NAME 'automount' SUP top STRUCTURAL DESC 'An entry in an automounter map' MUST ( cn $ automountInformation $ objectclass ) MAY ( description ) ) olcObjectClasses: {2}( 1.3.6.1.4.1.2312.4.2.2 NAME 'automountMap' SUP top STRUCTURAL DESC 'An group of related automount objects' MUST ( ou ) ) </pre> = synrepl = * http://www.openldap.org/doc/admin24/replication.html#Delta-syncrepl * http://wiki.debian.org/LDAP/OpenLDAPSetup * http://deandra.homeip.net/node/33 * http://www.fatofthelan.com/articles/articles.php?pid=24 * http://wiki.debian.org/LDAP/PowerDNSSetup * http://www.nomis52.net/?section=docs&page=samldap * http://bind9-ldap.bayour.com/ * http://www.venaas.no/ldap/bind-sdb/dnszone-schema.txt * http://www.venaas.no/ldap/bind-sdb/old.html * http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/FastStart.html#id2548624 * http://groups.google.com/group/linux.debian.user/browse_thread/thread/6e9003d03878c60f * http://fxp0.org.ua/2006/sep/21/powerdns-ldap-backend-setup/ * http://blog.leo34.net/2008/06/dns-server-bind-mit-zonen-in-ldap-via-bind-dlz/ * http://ressukka.net/blog/posts/20090323_split_dns/ * http://edin.no-ip.com/content/ldap-samba-pdc-pamnss-debian-lenny-howto * http://www.bind9.net/manuals * http://forums.b2evolution.net/viewtopic.php?printertopic=1&t=17434&postdays=0&postorder=asc&&start=0&sid=41055d010fb6109d10de45bb76065895 = authentication voor services met ldap = <hr> Terug naar: [[Webhuis Infrastructuur]]
Summary:
Please note that all contributions to Webhuis wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see
Project:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Voorpagina
Cobol and PostgreSQL
PostgreSQL
CFEngine
Proxmox
Webhuis Kennisbank
Basale infra
Webhuis bouwstenen
Webhuis configuratie
Webhuis Infra
Webhuis Support
Webhuis Raspberry
Opzet Applicaties
Business Applicaties
Community portal
Current events
Recent changes
Random page
Help
sitesupport
Tools
What links here
Related changes
Special pages
Page information