- OpenLDAP εγκατασταθηκε και τρεχει
- phpldapadmin to idio
- ftiaxnoume ena neo template. PROSOXH: to neo template mpainei sto dir templates/creation kai OXI sto template, opws leei to manual tou phpldapadmin
- migrate ta accounts, kati prepei na paizei me to passwd encryption apo solaris se linux
- Edit to /usr/share/perl5/migrate_common.ph kai bazoume to diko mas BASE, 8etoume to EXTEND_SCGEMA se 1 kai kanoume comment out oti exei me Kerberos. Epishs allazoume ta NAMINGCONTEXTS gia na sumfwnoun me to schema mas
- Allages sto migration_passwd gia na ferei ta idia pou 8a ferei kai to template pou 8a ftiaksoume gia to phpldapadmin. *****Ayto to shmeio ksanadesto, xreiazetai? *****
- Ta migration tools ftiaxnoun DNs ths morfhs uid, ou
- to User Account template tou phpldapadmin ftiaxnei DN ths morfhs cn, ou
- To template pou eftiaksa lunei to prob. Allazw to DN kata boulhsh
- Sto migrate_passwd, otan EXTEND_SCHEMA=1 bazei 3 structural classes, Ta 2 (person kai organisationPerson) ta ekana comment out. Ola ta attributes apo ta parent classes uparxoun sto class pou afhsa (inetOrgPerson). Reccomendation apo 2o link (oxi polla structural classes sta entries)
- Sto migrate_passwd, tupwnw kai mia timh displayName (=cn), sumfwna me to link 2
- Anadiataksh ektupwshs twn objectClass me to top sthn arxh, to inteOrg Person (structural) meta kai akolou8oun ta auxilliary
- xrhsimopoioume ta migrate_passwd/group/shadow
- Toi installation exei hdh dhmiourghsei to entry tou domain mas dc=iit,dc=demok....
- Ta 2nd lvl entries, People, Group, app kai adm ta ftiaxnoume me to xeri san ou entries
APOLUTWS APARAITHTO: ta users directories sto ldap, kai ta uid gid, einai apoluta!!!!!! Dhladh o xrhsths test me uid 1001 kai gid 1001 kai homedir /path/ti/homedir efarmozetai se OLA ta mhxanhmata pou o xrhshths autos exei access
phpLDAPADMIN
- $config->custom->cache['template'] = false;
- $config->custom->appearance['tree_display_format'] = '%displayName'; To displayName einai suggestion apo to 2o link
LDAPClientconfigauth-client-config -a -p lac_ldap ( to profile auto brisketai sto /etc/auth-client-config/profile.d/ldap-auth-config )
To -r kanei revert
auth-client-config, ldap-auth-client (metapackage), ldap-auth-config,libpam-ldap,libnss-ldap
ldap-auth-config : Can be managed by debconf (to debconf se rwtaei kapoia pramata gia to configuration)
conf arxeia(Just as quick aside, you should be aware by now that modifying /etc/ldap.conf really only affects the pam_ldap and nss_ldap modules, not OpenLDAP itself. OpenLDAP is typically configured elsewhere.)
to /etc/ldap.conf to diabazoun oi ldap client ka8e fora pou kalounte (opws ta commands ldapadd, ldapmodify, ldapsearch - apo to paketo ldap-utils)
All of the
OpenLDAP client programs share one common configuration file, /etc/ldap/ldap.conf
Bazoume HOST sto /etc/ldap/lda.confSta ldap-utils, o diakopths -d{1,2) kanei debugginf. Opws to debug {0,1,2_ sto /etc/ldap.conf
EPITELOUS
To documentation gia to /etc/ldap.conf gia oti afora to pam einai sto man pam_ldap. Gia to nss einai sto man nss_ldap
Whilst pam_ldap is generally configured in the system LDAP naming configuration file (ldap.conf), some options can be configured in the PAM configuration file, to allow for per-service granularity. These options include the path to the LDAP naming configuration file to use, so in effect all options can be configured on a per-service basis. Options are listed below under PAM Configuration.
NAI!!!!!!!!!!!!!!!!!!!!!!!!!!
8eloume ta local accounts KAI ta ldap accounts KAI apo ta LDAP accounts na isxuoun mono osa einai sto devices group tou LDAP gia sugkekrimeno mhxanhma. To kolpo einai na dhlwsoume sto account type tou pam kai to pam_unix kai to pam_ldap ws required kai na dhlwsoume sto pam_ldap ta orismata ignore_authinfo_unavail kai ignore_unknown_user.
The 'groupdn' parameter should be the dn of a *groupOfUniqueNames*,
not of a posixGroup. Where is that documented?
Pws allazoume password?
- Se opoio mhxanhma einai ldap client kanoume apla passwd. To nss_ldap analambanei ta upoloipa.
BTW nss and pam should make use of the /etc/ldap/ldap.conf file but it seems they expect it in /etc/openldap/... as the /etc/ldap.conf file states. Its important fact if you want to use ldaps(SSL/TLS encyption).
Mporei na xreiastei auth h plhroforia
Palioteres ekdoseis apo 7.10 gutsy
Ubuntu uses /etc/ldap.conf as libnss-ldap's configuration file
SHMANTIKO - /usr/share/doc/libnss-ldap/README.gz
I think its extremly important that you have a
/etc/shadow file so that an ObjectClass shadowAccount
will be created in the ldap database. My experience is
that without shadowAccount nss_ldap does not work on
solaris!!
Notes about Debian's libldap2 package
It has been reported that using libnss-ldap can cause a failure to
unmount /usr on system shutdown.
nss-updatedb 'h nscd
Provides a script which maintanins local caches of user/group dris. Used by DB NSS module (libnss-db) to provide name service when system is offline
'H nscd
ena apo ta 2
The bind_policy soft option forbids nss_ldap from retrying failed LDAP queries. If the default bind policy is used, LDAP will retry a query several times when the LDAP server is not present. This can cause a pause of several seconds during routine operations.
bind_policy hard retry with exponential backoff
Default bind_timelimit :30 seconds. To ;allaksa se 10sec kai aghnw to bind_policy se hard. Mporei na xreiazetai na allax8ei
libldap2: /etc/ldap/ldap.conf. man ldap.conf anaferetai se auto to ldap.conf
ldap-auth-config VERSION 0.4: /etc/ldap.conf, /etc/auth-client-config/profile.d/ldap-auth-config (DEBCONF confiures this)
auth-client-config - Script for modifying nsswitch.conf and pam: /etc/auth-client-config/profile.d/acc-default
https://help.ubuntu.com/community/LDAPClientAuthentication Einai kapws outdated bebaia.
https://wiki.ubuntu.com/LDAPAuthentication einai ena overview pou ekshgei pws einai organwmena ta paketa gia ldap client auth sto ubuntu
https://wiki.ubuntu.com/AuthClientConfig. Ekshgei ti kanei to paketo auth-client-config
http://www.derkeiler.com/Mailing-Lists/FreeBSD-Security/2007-09/msg00000.html To post ekshgei giati den douleuei to pam_groupdn. H seira pam_ldap.so, pam_unix so einai la8os.
ANA8EWRHSH Swsth einai alla to post FreeBSD specific. Tsekare to epomeno link kai to NAIIIIIIII header pio panw
http://marc.info/?l=pamldap&m=105575914618199&w=2DIT Design from LDAPCon07LDAP Schema DesignOn the fly group assignment
auth optional pam_group.so
kai bazoume sto /etc/security/group.conf entries opws ta parakatw
login;*;*;Al0000-2400;users,cdrom,floppy,plugdev,audio,dip
kdm;*;*;Al0000-2400;users,cdrom,floppy,plugdev,audio,dip,video
Warnings when we run slapd with default ACL configuration:
"cannot assess the validity of the ACL scope within backend naming context"
Works as intended. That's a reminder that
ACLs (may) scope outside the
backend they're defined in. For instance,
access to *
by * read
can appear anywhere, but it's not quite good inside a backend because it
also scopes outside. A more appropriate statement would be
access to dn.subtree=<suffix>
by * readslapd -g openldap -u openldap -f /etc/ldap/slapd.conf
In some cases (e.g. when using fancy submatches in regex clauses) slapd
can't quite get the actual scope of a rule; different warnings may
appear in that case.
TLS conf
- Ta certificated prepei na einai readable apo ton xrhsth pou trexei o slapd
- Epishs gia ton client prepei na einai readable to certificate
- To key DEN prepei na einai password protected
- sto slapd.conf bazoume security tls=1 gia na ginei enforce to tls
- Sto /etc/ldap.conf twn clients bazoume start_tls, pou douleuei sto standard ldap port 389
- Sto /etc/ldap.conf exei ena tls_cacerfile alla mallon den douleuei. To arxeio pou prepei na mpei to tls_cacert einai to .etc/ldap/ldap.conf
- sto /etc/ldap/ldap.conf bazoume to baze. Asxeto me tls einai auto
- sto /etc/ldap/ldap.conf bazoume to host. SHMANTIKO Gia na ginei swsta to tls certificate checking prepei to CN tou server certificate tou LDAP server na einai idio me to spec tou HOST sto /etc/ldap/ldap.conf. DIKLEIDA ASFALEIAS bazoume to fqdn tou LDAP server sto /etc/hosts KA8E client, giati an uparxei mono ston DNS kai o DNS server pesei tote to certificate verification apotugxanei kai ton pinei to conne.
- TO EPANALAMBANOUME. To /etc/ldap/ldap.conf to xrhsimopoioun ta ldap tools. To /etc/ldap.conf to xrhsimopoipoun to LDAP NSS library kai to LDAP PAM module
- Anoigoume to TLS gia to phpldapadmin
Indexing
cn,sn,givenName,email ta kanoume index gia equality kai substring matching
Sto /etc/ldap.con
8etoume kai ta nns_base_(passwd,shadow,group) gia xrhsh sta sugkekrimena maps
Maintenance.
Set readonlu
Backup the berkleyDB file in /var/lib/ldap
or/and
slapcat gia ldif output. Auto mporei na ginei ena polu wraio cron job
To slapcat den xreiazetai authenticate ktl ktl. Einai root only ergaleiaki,afou to slapd.conf einai readable mono apo ton root
ldapsearch options
-x simple bind
-W prompt for passwd
-D binddn
-Z(Z) initiate tls/ssl connection
To monitor backend exei energopoih8ei.
Xrhsimopoioume to ldapsearch me base cn=Monitor, scope (-s) base/sub/one kai filter '*' (all user app attrs) kai '+' (all operational attrs)
Link to openldap doc
This is only informative, not prescriptive, and it's been in HEAD for at
http://ubuntuforums.org/showthread.php?t=597056&highlight=pam+nss+ldap