Category Archives: OpenLDAP

Manage LDAP entries with ruby

Say you want to add an attribute to some entries. Here’s a sample: require ‘net/ldap’ # http://rdoc.info/gems/net-ldap/frames base = ‘ou=people,dc=my,dc=domain,dc=com’ filter = ‘(objectCLass=posixAccount)’ ldap = Net::LDAP.new ldap.host = ‘localhost’ ldap.port = 389 ldap.auth ‘cn=admin,dc=my,dc=domain,dc=com’, “passsword” if ldap.bind ldap.search( :base => … Continue reading

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

Apache userdirs from LDAP

Debian Squeeze Something like the following should be enough. I had no trouble at all. LDAPProtocolVersion 3 LDAPUserDirUseTLS off LDAPUserDirServer ldap1.my.domain.com ldap2.my.domain.com LDAPUserDirDNInfo cn=bind-user,dc=my,dc=domain,dc=com apassword LDAPUserDirBaseDN ou=people,dc=my,dc=domain,dc=com LDAPUserDirFilter “(&(uid=%u)(objectClass=posixAccount))” LDAPUserDir public_html LDAPUserDirCacheTimeout 31104000 The mod_ldap_userdir homepage is in github, the … Continue reading

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 mlocate ntp logwatch epel and rpmforge repos installed. disabled by default. Default repos always take precedence over epel, which always takes precedence over rpmforge, 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 … Continue reading

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 postfix setup, 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 mailer for local delivery. The ldap-aliases.cf file contains: server_host = x.x.x.x x.x.x.x version = 3 bind = no … Continue reading

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

LDAP client authentication on Debian squeeze

I’m using the newer method, which involves nslcd # apt-get install nslcd libnss-ldapd libpam-ldapd unscd. vim /etc/nslcd.conf Setup your bases, uri and so on. ldap_version 3 Set bind_timelimit to 10. There’s no bind_policy option, nor nss_timeout options. According to link … Continue reading

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 server, are replicated and so on, I can’t seem to make sssd to pick them up. I’ve cleared the caches, restarted the service, rebuild the … Continue reading

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

Setting up an LDAP server

Ubuntu 12.04 # apt-get install nginx nginx-common nginx-light phpldapamdin slapd php5-suhosin Logging 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 … Continue reading

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

Client authentication against OpenLDAP, for Ubuntu 12.04

This link contains all the necessary information. All changes to /etc/ldap.conf, meaning the old method is used (no nslcd, no *ldapd packages). Some points that I had to fiddle with: When using multiple ldap servers (for redundancy) I had to … Continue reading

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