1) Install openldap server in CentOS 6.5 yum install -y openldap* 2) Copy the sample slapd.conf configuration cp /usr/share/openldap-servers/slapd.conf.obsolete /etc/openldap/slapd.conf 3) Generate encrypted password for later use slappasswd 4) Modify /etc/openldap/slapd.conf, use the encrypted password created in above step. #TLSCACertificatePath /etc/openldap/certs #TLSCertificateFile "\"OpenLDAP Server\"" #TLSCertificateKeyFile /etc/openldap/certs/password database monitor access to * by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read by … Continue reading Setup LDAP authentication in CentOS (openldap+sssd)
Tag: Linux
Update puppet tags
This script allow you to apply the specified puppet tags to the listed hosts. It will do a dry run against the first host, if you are happy with the results then you can kick off the changes to all hosts. The script can be downloaded from here.
Push public key to remote hosts in a batch
Sometimes it is easy to use the passwordless SSH authentication against the remotes hosts. I wrote a script that can push your public key to remote hosts in a batch. The script can be downloaded from here
Fix duplicated package ID in red hat satellite
Our red hat satellite stops to sync from the subscribed red hat channel. We turned the debug on and found out it is caused by the duplicated package ID in the self-managed oracle database. Here is how to fix it: 1) Turn on debug to find out the duplicated package ID. echo "debug=7" >> /etc/rhn/rhn.conf … Continue reading Fix duplicated package ID in red hat satellite
Apache Rewrite Rule Flags – NE
I was working on an Apache URL redirection request this morning. The task is to redirect the URL ‘^/example/1’ to ‘/#example1’. My first configuration is something like below. When I test it, the redirected URL becomes …/%23example1 instead of …/#example1. RewriteRule ^/example/1(/)?$ %{HTTP_HOST}/#example1 [R,L,NC] As you see the problem is that the redirection automatically convert … Continue reading Apache Rewrite Rule Flags – NE