Category Archives: OpenLDAP

Manage LDAP entries with ruby

Say you want to add an attribute to some entries. Here’s a sam­ple: require ‘net/ldap’ # http://rdoc.info/gems/net-ldap/frames base = ‘ou=people,dc=my,dc=domain,dc=com’ fil­ter = ‘(objectCLass=posixAccount)’ ldap = Net::LDAP.new ldap.host = ‘local­host’ ldap.port = 389 ldap.auth ‘cn=admin,dc=my,dc=domain,dc=com’, “passs­word” if ldap.bind ldap.search( :base => base, … Con­tin­ue read­ing

Share
Posted in OpenLDAP, Ruby | Comments Off on Manage LDAP entries with ruby

Apache userdirs from LDAP

Debian Squeeze Some­thing like the fol­low­ing should be enough. I had no trou­ble at all. LDAP­Pro­to­colVer­sion 3 LDA­PUserDirUseTLS off LDA­PUserDirServ­er ldap1.my.domain.com ldap2.my.domain.com LDA­PUserDirD­NIn­fo cn=bind-user,dc=my,dc=domain,dc=com apass­word LDA­PUserDirBaseDN ou=people,dc=my,dc=domain,dc=com LDA­PUserDirFil­ter “(&(uid=%u)(objectClass=posixAccount))” LDA­PUserDir public_html LDA­PUserDirCa­cheTime­out 31104000 The mod_ldap_userdir home­page is in github, the direc­tives … Con­tin­ue read­ing

Share
Posted in Debian, OpenLDAP | Comments Off on Apache userdirs from LDAP

Configuring CentOs 6.4 with iSCSI, Multipathing, OpenLDAP and NFS

yum install wget mlo­cate ntp log­watch epel and rpm­forge repos installed. dis­abled by default. Default repos always take prece­dence over epel, which always takes prece­dence over rpm­forge, http://fedoraproject.org/wiki/EPEL/FAQ wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6–8.noarch.rpm rpm -Uvh epel-release-6–8.noarch.rpm http://wiki.centos.org/AdditionalResources/Repositories/RPMForge#head-f0c3ecee3dbb407e4eed79a56ec0ae92d1398e01 wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3–1.el6.rf.x86_64.rpm yum install yum-utils git … Con­tin­ue read­ing

Share
Posted in CentOS, OpenLDAP | Comments Off on Configuring CentOs 6.4 with iSCSI, Multipathing, OpenLDAP and NFS

Postfix, Dovecot, LDAP

On a Debian squeeze box. My post­fix set­up, in main.cf: alias_maps = hash:/etc/aliases ldap:/etc/postfix/ldap-aliases.cf local_recipient_maps = unix:passwd.byname $alias_maps because I’ve set my mail­er for local deliv­ery. The ldap-aliases.cf file con­tains: server_host = x.x.x.x x.x.x.x ver­sion = 3 bind = no search_base= … Con­tin­ue read­ing

Share
Posted in OpenLDAP, Postfix | Comments Off on Postfix, Dovecot, LDAP

LDAP client authentication on Debian squeeze

I’m using the new­er method, which involves nslcd # apt-get install nslcd lib­nss-ldapd lib­pam-ldapd unscd. vim /etc/nslcd.conf Set­up your bases, uri and so on. ldap_version 3 Set bind_timelimit to 10. There’s no bind_policy option, nor nss_timeout options. Accord­ing to link … Con­tin­ue read­ing

Share
Posted in Debian, OpenLDAP | Comments Off on LDAP client authentication on Debian squeeze

Notes: CentOS 6.4 sssd configuration

UPDATE There’s a strange issue with sssd. Although some ldap entries exist in the ldap serv­er, are repli­cat­ed and so on, I can’t seem to make sssd to pick them up. I’ve cleared the caches, restart­ed the ser­vice, rebuild the slapd index­es. … Con­tin­ue read­ing

Share
Posted in CentOS, OpenLDAP | Comments Off on Notes: CentOS 6.4 sssd configuration

Setting up an LDAP server

Ubun­tu 12.04 # apt-get install nginx nginx-com­mon nginx-light phplda­pamdin slapd php5-suhosin Log­ging By default slapd logs in /var/log/syslog. Let’s change that to log in it’s own file: # touch /var/log/ldap.log # chown syslog.openldap /var/log/ldap.log # chmod g+rw /var/log/ldap.log # chmod … Con­tin­ue read­ing

Share
Posted in OpenLDAP, Ubuntu | Comments Off on Setting up an LDAP server

Client authentication against OpenLDAP, for Ubuntu 12.04

This link con­tains all the nec­es­sary infor­ma­tion. All changes to /etc/ldap.conf, mean­ing the old method is used (no nslcd, no *ldapd pack­ages). Some points that I had to fid­dle with: When using mul­ti­ple ldap servers (for redun­dan­cy) I had to tweak bind_timelimit … Con­tin­ue read­ing

Share
Posted in OpenLDAP, Ubuntu | Comments Off on Client authentication against OpenLDAP, for Ubuntu 12.04