Monthly Archives: June 2013

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