<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-20295016</id><updated>2011-12-03T23:49:25.486+01:00</updated><title type='text'>My 2nd Head</title><subtitle type='html'>This blog is for all the things I don't want to store in my 1st head... :-)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mysecondhead.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mysecondhead.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mika</name><uri>http://www.blogger.com/profile/01227599305756160125</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>8</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-20295016.post-115805438691658750</id><published>2006-09-12T11:42:00.000+02:00</published><updated>2006-09-12T12:55:28.220+02:00</updated><title type='text'>Remote cleanup patch for  ZFS Auto-Snapshot</title><content type='html'>This patch cleans up remote snapshots. Use with zfs-snapshot version 0.6. Thanks &lt;a href="http://blogs.sun.com/timf/entry/zfs_automatic_snapshots_now_with"&gt;Tim&lt;/a&gt; for this great utility!&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;#&lt;br /&gt;# CDDL HEADER START&lt;br /&gt;#&lt;br /&gt;# The contents of this file are subject to the terms of the&lt;br /&gt;# Common Development and Distribution License, Version 1.0 only&lt;br /&gt;# (the "License").  You may not use this file except in compliance&lt;br /&gt;# with the License.&lt;br /&gt;#&lt;br /&gt;# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE&lt;br /&gt;# or http://www.opensolaris.org/os/licensing.&lt;br /&gt;# See the License for the specific language governing permissions&lt;br /&gt;# and limitations under the License.&lt;br /&gt;#&lt;br /&gt;# When distributing Covered Code, include this CDDL HEADER in each&lt;br /&gt;# file and include the License file at usr/src/OPENSOLARIS.LICENSE.&lt;br /&gt;# If applicable, add the following below this CDDL HEADER, with the&lt;br /&gt;# fields enclosed by brackets "[]" replaced with your own identifying&lt;br /&gt;# information: Portions Copyright [yyyy] [name of copyright owner]&lt;br /&gt;#&lt;br /&gt;# CDDL HEADER END&lt;br /&gt;#&lt;br /&gt;# Version 0.1&lt;br /&gt;# This patch adds the backup destroy functionality to zfs-auto-snapshot-0.6&lt;br /&gt;#&lt;br /&gt;# An additional property is needed in the manifest beside the backup-save-cmd.&lt;br /&gt;# This example deletes all snapshots according to the retention policy:&lt;br /&gt;#&lt;br /&gt;# &amp;lt;propval name="backup-destroy-cmd" type="astring"&lt;br /&gt;#          value="/usr/bin/ssh user@host /usr/bin/pfexec /usr/sbin/zfs destroy u00/test"&lt;br /&gt;#          override="true"/&gt;&lt;br /&gt;&lt;br /&gt;281a282,284&lt;br /&gt;&gt;         typeset BACKUP_DESTROY_CMD=$(svcprop -p zfs/backup-destroy-cmd $FMRI &gt;                                     | sed -e 's/\\//g')&lt;br /&gt;&gt;&lt;br /&gt;297a301,309&lt;br /&gt;&gt;&lt;br /&gt;&gt;                       if [ -n "${BACKUP_DESTROY_CMD}" ]&lt;br /&gt;&gt;                       then&lt;br /&gt;&gt;                               typeset REMOTE_SNAP=${snapshot##*@}&lt;br /&gt;&gt;                               echo "Backup snapshot being destroyed as per retention policy."&lt;br /&gt;&gt;                               $($BACKUP_DESTROY_CMD@$REMOTE_SNAP)&lt;br /&gt;&gt;                               check_failure $? "Unable to destroy remote snapshot"&lt;br /&gt;&gt;                       fi&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20295016-115805438691658750?l=mysecondhead.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mysecondhead.blogspot.com/feeds/115805438691658750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20295016&amp;postID=115805438691658750' title='95 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/115805438691658750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/115805438691658750'/><link rel='alternate' type='text/html' href='http://mysecondhead.blogspot.com/2006/09/remote-cleanup-patch-for-zfs-auto.html' title='Remote cleanup patch for  ZFS Auto-Snapshot'/><author><name>Mika</name><uri>http://www.blogger.com/profile/01227599305756160125</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>95</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20295016.post-114965925813896218</id><published>2006-06-07T07:39:00.000+02:00</published><updated>2006-07-31T11:11:45.070+02:00</updated><title type='text'>Solaris 10 and Novell NDS</title><content type='html'>I finished my project to use existing Novell NDS accounts on Solaris 10. Here you find, what is needed.&lt;br /&gt;&lt;br /&gt;First of all, you have to make sure that all needed schemas are available. Normally the posixAccount and shadowAccount Classes should be available by default. &lt;a href="http://docs.sun.com/app/docs/doc/816-4556/6maort2tk?a=view"&gt;Additional schemas&lt;/a&gt; can be found at docs.sun.com.&lt;br /&gt;&lt;br /&gt;After that add these classes to the user. Keep in mind, that some attributes might have different names (uid is name userId).&lt;br /&gt;&lt;br /&gt;Now a proxy account has to be created. This account is needed by the Solaris Client to browse the directory.&lt;br /&gt;&lt;br /&gt;As you are already in Novell's Console One, you can export the server certificates for both LDAP Directories. Make sure they are in pem (b64) format. The certificates will be used for TLS.&lt;br /&gt;&lt;br /&gt;Use certutil (in /usr/sfw/bin) to create the cert8 databases and importing the server certificates. Then copy all .db files to /var/ldap.&lt;br /&gt;&lt;br /&gt;If everything is done you can initialize the client. I use manual initialization. But if you have a large environment you might find it usefull to store the initialization profile also in the ldap directory.&lt;br /&gt;&lt;br /&gt;Initializing the ldapclinet is a little bit tricky. As soon as you run the ldapclient init command, nsswitch.conf will be replaced, with a version that doesn't search for DNS entries.&lt;br /&gt;&lt;br /&gt;Without DNS (or at least /etc/hosts entries) the ldap server will not be found, and if you use IP-addresses the certificate will not match. Therefore I use a two step method. First binding to a LDAP Server to port 389 (unsecure), and after that I edit the nsswitch.conf and pam.conf files.&lt;br /&gt;&lt;br /&gt;(Another way would be to edit nsswitch.conf during initialization and the kill the cachemgr daemon)&lt;br /&gt;&lt;br /&gt;After that I will modify my configuration to use tls:simple and fully qualified hostnames.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;ldapclient -v  manual -a domainName=domain.net -a authenticationMethod=simple -a credentialLevel=proxy -a proxyDN=cn=proxyUser,ou=ldap,o=organisation -a proxyPassword=password -a defaultSearchBase=o=clariden -a defaultSearchScope=sub -a defaultServerList=xxx.xxx.xxx.xxx -a serviceSearchDescriptor=passwd:o=clariden?sub?groupMembership=cn=solarisprod,ou=Administration,ou=Groups,o=Organisation -a serviceSearchDescriptor=shadow:ou=users,o=organisation?sub -a serviceSearchDescriptor=user_attr:ou=users,o=organisation?sub -a serviceSearchDescriptor=group:ou=users,o=organisation?sub -a serviceSearchDescriptor=audit_user:ou=userso=organisation?sub -a attributeMap=passwd:uid=userId -a attributeMap=user_attr:uid=userId -a attributeMap=audit_user:uid=userId -a certificatePath=/var/ldap&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;cp /etc/nsswitch.conf.ldap /etc/nsswitch.conf&lt;br /&gt;cp /etc/pam.conf.ldap /etc/pam.conf&lt;br /&gt;&lt;br /&gt;ldapclient -v mod -a defaultServerList=ldap1.domain,ldap2.domain -a authenticationMethod=tls:simple&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The nsswitch.conf looks like e.g.:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# the following two lines obviate the "+" entry in /etc/passwd and /etc/group.&lt;br /&gt;passwd: files ldap&lt;br /&gt;group: files ldap&lt;br /&gt;&lt;br /&gt;# consult /etc "files" only if ldap is down.&lt;br /&gt;hosts: files dns&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There is a &lt;a href="http://docs.sun.com/app/docs/doc/816-4556/6maort2te?a=view"&gt;pam.conf&lt;/a&gt; sample on docs.sun.com&lt;br /&gt;&lt;br /&gt;A little bit about the ldapclient init attributes, where not self explanatory:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;-a serviceSearchDescriptor=passwd:o=organisation?sub?groupMembership=cn=solarisprod,ou=Administration,ou=unixgroups,o=organisation&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This means that password entries will be searches if the user contains the groupMembership attribute solarisprod. This is a great way to limit (filtering with LDAP URL) users to certain servers. There are &lt;a href="http://docs.sun.com/app/docs/doc/816-4556/6maort2tn?a=view"&gt;default filters&lt;/a&gt; that every service.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;-a serviceSearchDescriptor=user_attr:o=Organisation?sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is is used for the user_attr database.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;-a attributeMap=passwd:uid=userId -a attributeMap=user_attr:uid=userId \&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Novell NDS uses internally the uid-attribute for users. In Novell's LDAP implentation this is mapped to userId. Because the Solaris Client searches the attribute by the name uid, this has to be mapped.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As nice as it would be, the pam.conf entry&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;passwd auth binding pam_passwd_auth.so.1 server_policy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;would allow a password change to send the new password in clear text (TLS encrypted) to the LDAP Server to use a universal password. This means a solaris client could also change novell passwords.&lt;br /&gt;&lt;br /&gt;But unfortunatly, NDS does not allow a user to change the password directly. The way to achieve this would be, to first delete the password and then add a new one, all in one ldap request.&lt;br /&gt;&lt;br /&gt;Technorati Tags: &lt;a href="http://technorati.com/tag/solaris"&gt;Solaris&lt;/a&gt; &lt;a href="http://technorati.com/tag/novell"&gt;LDAP Novell&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20295016-114965925813896218?l=mysecondhead.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mysecondhead.blogspot.com/feeds/114965925813896218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20295016&amp;postID=114965925813896218' title='46 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/114965925813896218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/114965925813896218'/><link rel='alternate' type='text/html' href='http://mysecondhead.blogspot.com/2006/06/solaris-10-and-novell-nds.html' title='Solaris 10 and Novell NDS'/><author><name>Mika</name><uri>http://www.blogger.com/profile/01227599305756160125</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>46</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20295016.post-114949136239009732</id><published>2006-06-05T08:51:00.000+02:00</published><updated>2006-06-05T09:22:08.750+02:00</updated><title type='text'>Apache 2.2.2 and Novell NDS</title><content type='html'>I had some &lt;a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=38789"&gt;trouble&lt;/a&gt; with the Sun Solaris included LDAP SDK accessing a Novell NDS for Authentication/Authorization...&lt;br/&gt;&lt;br/&gt;Anyway, I wanted to use Secure LDAP, and there's no way to get arround the &lt;a href="http://developer.novell.com/wiki/index.php/Cldap"&gt;Novell CLDAP SDK&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;Here's the way to compile apache on a T2000. Take a look at all those with-ldap-something paramaters. Took a long time to figure these out. Documentation sucks...&lt;br/&gt;&lt;br/&gt;&lt;span style="font-family:courier new;"&gt;./configure --prefix=/u00/appl/apache2 \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;--enable-mods-shared=all \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;--enable-ssl \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;--enable-authnz-ldap \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;--with-ssl=/usr/sfw \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;--with-ldap \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;--with-ldap-dir=/u00/appl/novell-cldap \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;--enable-ldap \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;--with-ldap-lib=/u00/appl/novell-cldap/lib \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;--with-ldap-include=/u00/appl/novell-cldap/include \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;--libdir=/usr/local/lib \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;--with-apr=/u00/appl/apache2/apr-httpd \&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;--with-apr-util=/u00/appl/apache2/apr-util-httpd&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;It seems there is a bug in Apache's MPM-Worker implementation as my cgi's won't run when using that options. As I don't have that much traffic I don't use it.&lt;br/&gt;&lt;br/&gt;What I don't like is, that by default you can't make a "make install" without being root. Apache want's to install the apr stuff into /usr/local/. Therefore you shoud first set the apr prefix to your directory of choice (mine is under apache2).&lt;br/&gt;&lt;br/&gt;&lt;span style="font-family:arial;"&gt;Here is the httpd.conf&lt;/span&gt;&lt;span style="font-family:arial;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;br/&gt;&lt;span style="font-family:courier new;"&gt;LDAPTrustedGlobalCert CA_BASE64 /u00/appl/apache2/conf/rootca.pem&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;LDAPVerifyServerCert On&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;LDAPCacheEntries 1024&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;LDAPCacheTTL 600&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;LDAPOpCacheEntries 1024&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;LDAPOPCacheTTL 600&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;LDAPSharedCacheFile  /u00/appl/apache2/logs/ldap_cache&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Alias /location /u00/appl/somewhere&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;location location=""&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;        AuthType Basic&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;        AuthName "host.domain"&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;        AuthBasicProvider ldap&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;        AuthLDAPURL ldaps://ldap1.domain/o=Organisation?uid&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;        require ldap-attribute ou=OrganisationUnit&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;        Options Indexes&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;        IndexOptions FancyIndexing&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;        IndexStyleSheet "/css/font.css"&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;        Order allow,deny&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br/&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;        Allow from all&lt;/span&gt;&lt;br/&gt;&lt;/location&gt;&lt;br/&gt;&lt;br/&gt;The certificate is in pem/b64 format.&lt;br/&gt;&lt;br/&gt;Good luck!&lt;br/&gt;&lt;br/&gt;Technorati Tags: &lt;a href="http://technorati.com/tag/apache"&gt;Apache &lt;/a&gt;&lt;a href="http://technorati.com/tag/ldap"&gt;LDAP&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20295016-114949136239009732?l=mysecondhead.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mysecondhead.blogspot.com/feeds/114949136239009732/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20295016&amp;postID=114949136239009732' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/114949136239009732'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/114949136239009732'/><link rel='alternate' type='text/html' href='http://mysecondhead.blogspot.com/2006/06/apache-222-and-novell-nds.html' title='Apache 2.2.2 and Novell NDS'/><author><name>Mika</name><uri>http://www.blogger.com/profile/01227599305756160125</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20295016.post-114060253009872374</id><published>2006-02-22T10:49:00.000+01:00</published><updated>2006-02-23T12:45:06.213+01:00</updated><title type='text'>Enabling LDAP Authentication/Authorization in Apache 2.2</title><content type='html'>Easy as this:&lt;br /&gt;&lt;br /&gt;-Configure with SSL Modules&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;# ./configure --prefix=path_to_apache/apache2 --enable-mods-shared=all --enable-ssl=shared --enable-authnz-ldap --with-ssl=/usr/local/ssl --with-ldap --enable-ldap&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;-Install apache&lt;br /&gt;&lt;br /&gt;-Configure apache&lt;br /&gt;&lt;br /&gt;&lt;location&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;AuthType Basic&lt;br /&gt;AuthName "Realm Name"&lt;br /&gt;AuthBasicProvider ldap&lt;br /&gt;AuthLDAPURL ldap://ldap1.domain:389/o=Company?uid&lt;br /&gt;require ldap-attribute ou=someValue&lt;br /&gt;Order allow,deny&lt;br /&gt;Allow from all&lt;/span&gt;&lt;br /&gt;&lt;/location&gt;&lt;br /&gt;&lt;br /&gt;Apache will connect anonymously to the LDAP Server &lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;em&gt;ldap&lt;/em&gt;&lt;/span&gt;, to check the existence of the &lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;em&gt;uid&lt;/em&gt;&lt;/span&gt;. If OK, Apache will connect again to the LDAP Server using the Basic Auth Information from the web browser.&lt;br /&gt;&lt;br /&gt;Additionally the &lt;span style="font-family:courier new;font-size:85%;"&gt;require ldap-attribute&lt;/span&gt; checks if the user belongs to an &lt;span style="font-family:courier new;font-size:85%;"&gt;ou&lt;/span&gt; (Organizational Unit).&lt;br /&gt;&lt;br /&gt;That's all, folks!&lt;br /&gt;&lt;br /&gt;PS: I have this nasty bug, that if an existing user provides a wrong password the server will create an internal error. This does not happen for non existing users. Strange things happen...&lt;br /&gt;&lt;br /&gt;Technorati Tags: &lt;a href="http://technorati.com/tag/apache" rel="tag"&gt;Apache&lt;/a&gt; &lt;a href="http://technorati.com/tag/ldap" rel="tag"&gt;LDAP&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20295016-114060253009872374?l=mysecondhead.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mysecondhead.blogspot.com/feeds/114060253009872374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20295016&amp;postID=114060253009872374' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/114060253009872374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/114060253009872374'/><link rel='alternate' type='text/html' href='http://mysecondhead.blogspot.com/2006/02/enabling-ldap-authenticationauthorizat.html' title='Enabling LDAP Authentication/Authorization in Apache 2.2'/><author><name>Mika</name><uri>http://www.blogger.com/profile/01227599305756160125</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20295016.post-114060167642212724</id><published>2006-02-22T10:09:00.000+01:00</published><updated>2006-02-23T12:43:56.583+01:00</updated><title type='text'>Creating a self-signed SSL Certificate for Apache 2.2</title><content type='html'>This is a great link that describes how to create a self-signed certificate e.g. for apache.&lt;br /&gt;&lt;a href="http://www.tc.umn.edu/~brams006/selfsign.html"&gt;http://www.tc.umn.edu/~brams006/selfsign.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;When using apache 2.2. you can include the file conf/extra/httpd-ssl.conf in your httpd.conf:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;# Secure (SSL/TLS) connections&lt;br /&gt;Include conf/extra/httpd-ssl.conf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There you have to set some parameters:&lt;br /&gt;&lt;br /&gt;-Enable httpd listening port to 443 (default):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;Listen 443&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;-Paths to keys and certificates:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;# Server Private Key:&lt;br /&gt;# If the key is not combined with the certificate, use this&lt;br /&gt;# directive to point at the key file. Keep in mind that if&lt;br /&gt;# you've both a RSA and a DSA private key you can configure&lt;br /&gt;# both in parallel (to also allow the use of DSA ciphers, etc.)&lt;br /&gt;SSLCertificateKeyFile path_to_apache/apache2/conf/server.key&lt;br /&gt;&lt;br /&gt;# Server Certificate:&lt;br /&gt;# Point SSLCertificateFile at a PEM encoded certificate. If&lt;br /&gt;# the certificate is encrypted, then you will be prompted for a&lt;br /&gt;# pass phrase. Note that a kill -HUP will prompt again. Keep&lt;br /&gt;# in mind that if you have both an RSA and a DSA certificate you&lt;br /&gt;# can configure both in parallel (to also allow the use of DSA&lt;br /&gt;# ciphers, etc.)&lt;br /&gt;SSLCertificateFile path_to_apache/apache2/conf/server.crt&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The browser will negotiate the key length using the SSL Cipher Suite. As the keylenght may be even 256bit, this could slow the connection down a lot. To lower the lenght if possible to 128bit, add/replace following line:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;# SSL Cipher Suite:&lt;br /&gt;# List the ciphers that the client is permitted to negotiate.&lt;br /&gt;# See the mod_ssl documentation for a complete list.&lt;br /&gt;SSLCipherSuite !ADH:!EXPORT56:!EXPORT40:RC4+RSA:+3DES:+MEDIUM:+HIGH:!LOW:+SSLv2:+EXP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;!LOW&lt;/span&gt; e.g. means that 56bit keys are not allowed.&lt;br /&gt;See &lt;a href="http://httpd.apache.org/docs/2.0/mod/mod_ssl.html"&gt;http://httpd.apache.org/docs/2.0/mod/mod_ssl.html&lt;/a&gt; for a full explanation.&lt;br /&gt;&lt;br /&gt;Don't forget to set the pseudo random number generator to &lt;span style="font-family:courier new;font-size:85%;"&gt;/dev/urandom&lt;/span&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;# Pseudo Random Number Generator (PRNG):&lt;br /&gt;# Configure one or more sources to seed the PRNG of the SSL library.&lt;br /&gt;# The seed data should be of good random quality.&lt;br /&gt;# WARNING! On some platforms /dev/random blocks if not enough entropy&lt;br /&gt;# is available. This means you then cannot use the /dev/random device&lt;br /&gt;# because it would lead to very long connection times (as long as&lt;br /&gt;# it requires to make more entropy available). But usually those&lt;br /&gt;# platforms additionally provide a /dev/urandom device which doesn't&lt;br /&gt;# block. So, if available, use this one instead. Read the mod_ssl User&lt;br /&gt;# Manual for more details.&lt;br /&gt;#&lt;br /&gt;SSLRandomSeed startup file:/dev/urandom 512&lt;br /&gt;SSLRandomSeed connect file:/dev/urandom 512&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After that,  restart apache.&lt;br /&gt;&lt;br /&gt;Technorati Tags: &lt;a href="http://technorati.com/tag/apache" rel="tag"&gt;Apache&lt;/a&gt; &lt;a href="http://technorati.com/tag/ssl" rel="tag"&gt;SSL&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20295016-114060167642212724?l=mysecondhead.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mysecondhead.blogspot.com/feeds/114060167642212724/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20295016&amp;postID=114060167642212724' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/114060167642212724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/114060167642212724'/><link rel='alternate' type='text/html' href='http://mysecondhead.blogspot.com/2006/02/creating-self-signed-ssl-certificate.html' title='Creating a self-signed SSL Certificate for Apache 2.2'/><author><name>Mika</name><uri>http://www.blogger.com/profile/01227599305756160125</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20295016.post-114059735744673602</id><published>2006-02-22T09:32:00.000+01:00</published><updated>2006-02-23T12:43:07.263+01:00</updated><title type='text'>Solaris ACLs</title><content type='html'>I can never ever remember how to set ACLs. So this is the way to go...&lt;br /&gt;&lt;br /&gt;To narrow it down, I have three users apache, sysaudit, syslogng.&lt;br /&gt;&lt;br /&gt;sysaudit and syslogng should be allowed to read and write into the directory (incl. sub-directories), apache should be only allowed to read.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;# &lt;strong&gt;ls -la&lt;/strong&gt;&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;drwxr-x--- 5 root root 512 Feb 17 16:18 auditlog&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;# &lt;strong&gt;getfacl auditlog&lt;/strong&gt;&lt;br /&gt;# file: auditlog&lt;br /&gt;# owner: root&lt;br /&gt;# group: root&lt;br /&gt;user::rwx&lt;br /&gt;group::r-x #effective:r-x&lt;br /&gt;mask:r-x&lt;br /&gt;other:---&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The acl should look like this in the end:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;font-size:85%;"&gt;&lt;br /&gt;# &lt;strong&gt;getfacl auditlog&lt;/strong&gt;&lt;br /&gt;# file: auditlog&lt;br /&gt;# owner: root&lt;br /&gt;# group: root&lt;br /&gt;user::rwx&lt;br /&gt;user:apache:r-x #effective:r-x&lt;br /&gt;user:syslogng:rwx #effective:rwx&lt;br /&gt;user:sysaudit:rwx #effective:rwx&lt;br /&gt;group::r-x #effective:r-x&lt;br /&gt;mask:rwx&lt;br /&gt;other:---&lt;br /&gt;default:user::rwx&lt;br /&gt;default:user:apache:r-x&lt;br /&gt;default:user:syslogng:rwx&lt;br /&gt;default:user:sysaudit:rwx&lt;br /&gt;default:group::---&lt;br /&gt;default:mask:rwx&lt;br /&gt;default:other:---&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Notice:&lt;br /&gt;-default means, that all files created in this directory will inherit the same permissions.&lt;br /&gt;-mask is the maximum permission allowed.&lt;br /&gt;-#effective is calculated by using the AND function between the permission and the mask. As it says, it is the effective permission seen by the user.&lt;br /&gt;&lt;br /&gt;I find it easier to edit the ACL using a textfile (once you have a template), than write complex setfacl commands (ugly syntax).&lt;br /&gt;&lt;br /&gt;This acl-file can then be applied using &lt;span style="font-family:courier new;font-size:85%;"&gt;setfacl [-r] -f acl_file file&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Another easy way to do this stuff is to use &lt;span style="font-family:courier new;font-size:85%;"&gt;/usr/dt/bin/dtfile&lt;/span&gt;. Very usefull to apply the ACLs recursivly to subdirectories.&lt;br /&gt;&lt;br /&gt;Technorati Tags: &lt;a href="http://technorati.com/tag/solaris" rel="tag"&gt;Solaris&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20295016-114059735744673602?l=mysecondhead.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mysecondhead.blogspot.com/feeds/114059735744673602/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20295016&amp;postID=114059735744673602' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/114059735744673602'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/114059735744673602'/><link rel='alternate' type='text/html' href='http://mysecondhead.blogspot.com/2006/02/solaris-acls.html' title='Solaris ACLs'/><author><name>Mika</name><uri>http://www.blogger.com/profile/01227599305756160125</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20295016.post-114059697306373955</id><published>2006-02-22T09:29:00.000+01:00</published><updated>2006-02-23T12:41:36.643+01:00</updated><title type='text'>OpenSSH Headache</title><content type='html'>&lt;span style=";font-family:arial;font-size:100%;"  &gt;Another chapter of stupid failures...&lt;br /&gt;&lt;br /&gt;Publickey authentication does not work anymore...therefore:&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;Debugging OpenSSH with Level 3:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;# ssh -vvv  user@hostname&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;debug2: we sent a publickey packet, wait for reply&lt;br /&gt;...&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;debug2: we did not send a packet, disable method&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;.&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;.&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;Client debugging shows no useful information...&lt;br /&gt;&lt;br /&gt;After using snoop, dtrace and other debugging tools without any real hints, I finally found the reason, using sshd in debugging mode. Important detail: without the option -e, the failure can not be found. This was the reason for loosing a lot of time, because I tried the command already in an early debugging phase, without the option -e.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;# sshd -ddd -e&lt;br /&gt;&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt; User user not allowed because account is locked&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Ahah. The user was locked...This was again a problem that would normally have been solved in a couple of minutes...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Technorati Tags: &lt;a href="http://technorati.com/tag/ssh" rel="tag"&gt;SSH&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20295016-114059697306373955?l=mysecondhead.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mysecondhead.blogspot.com/feeds/114059697306373955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=20295016&amp;postID=114059697306373955' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/114059697306373955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/114059697306373955'/><link rel='alternate' type='text/html' href='http://mysecondhead.blogspot.com/2006/02/openssh-headache.html' title='OpenSSH Headache'/><author><name>Mika</name><uri>http://www.blogger.com/profile/01227599305756160125</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-20295016.post-113584228268437579</id><published>2005-12-28T16:00:00.000+01:00</published><updated>2005-12-29T08:44:42.690+01:00</updated><title type='text'>Welcome to my Blog!</title><content type='html'>This is my first entry.&lt;br /&gt;&lt;br /&gt;May the Blog be with me...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/20295016-113584228268437579?l=mysecondhead.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/113584228268437579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/20295016/posts/default/113584228268437579'/><link rel='alternate' type='text/html' href='http://mysecondhead.blogspot.com/2005/12/welcome-to-my-blog.html' title='Welcome to my Blog!'/><author><name>Mika</name><uri>http://www.blogger.com/profile/01227599305756160125</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
