<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>Things I&#039;ve found useful</title> <atom:link href="http://usefulthings.org.uk/feed/" rel="self" type="application/rss+xml" /><link>http://usefulthings.org.uk</link> <description></description> <lastBuildDate>Fri, 06 Jan 2012 14:19:11 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>Using a non supported Timemachine volume</title><link>http://usefulthings.org.uk/2012/01/using-a-non-supported-timemachine-volume/</link> <comments>http://usefulthings.org.uk/2012/01/using-a-non-supported-timemachine-volume/#comments</comments> <pubDate>Fri, 06 Jan 2012 14:19:11 +0000</pubDate> <dc:creator>robin</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[usefulthings]]></category> <category><![CDATA[mac]]></category> <guid
isPermaLink="false">http://riviera.org.uk/?p=2010</guid> <description><![CDATA[Always forget this bit:defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1Speficially needed if you are using a Linux box, shared by Apple Talk.From here in this instance, although there are loads of howtos. ]]></description> <content:encoded><![CDATA[<p>Always forget this bit:</p><pre>defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1</pre><p>Speficially needed if you are using a Linux box, shared by Apple Talk.</p><p>From <a
href="http://www.nextgengeek.com/2011/03/05/howto-use-linux-as-a-networked-timemachine-volume-for-your-mac/">here</a> in this instance, although there are loads of howtos.</p> ]]></content:encoded> <wfw:commentRss>http://usefulthings.org.uk/2012/01/using-a-non-supported-timemachine-volume/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>AirPrint for iOS on Linux</title><link>http://usefulthings.org.uk/2011/03/airprint-for-ios-on-linux/</link> <comments>http://usefulthings.org.uk/2011/03/airprint-for-ios-on-linux/#comments</comments> <pubDate>Mon, 21 Mar 2011 21:49:12 +0000</pubDate> <dc:creator>robin</dc:creator> <category><![CDATA[AirPrint]]></category> <category><![CDATA[Apple]]></category> <category><![CDATA[iOS]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[printing]]></category> <category><![CDATA[Update]]></category> <category><![CDATA[usefulthings]]></category> <guid
isPermaLink="false">http://riviera.org.uk/?p=1712</guid> <description><![CDATA[I quite often used to find myself wanting to print from my iPad, so when Apple announced AirPrint I thought things were looking good. According to the press release you would need either a HP printer or you could print to a shared printer on an existing mac. Sorted, I&#8217;ve got the latter of those, [...]]]></description> <content:encoded><![CDATA[<p>I quite often used to find myself wanting to print from my iPad, so when Apple <a
href="http://www.apple.com/pr/library/2010/09/15airprint.html">announced</a> AirPrint I thought things were looking good. According to the press release you would need either a HP printer or you could print to a shared printer on an existing mac. Sorted, I&#8217;ve got the latter of those, things were looking rosy.</p><p>Things took a turn for the worse when I read that they had <a
href="http://www.macrumors.com/2010/11/10/apple-delays-or-cancels-support-for-airprint-via-shared-printers-on-macs-and-pcs/">pulled </a>support for printing via shared printers and were only going to allow AirPrint to certain (at the moment only HP) printers.  I wanted the feature, but not enough to replace my trusty <a
href="http://www.lexmark.co.uk/lexmark/product/home/369/0,6970,252735_796629346_1190270321_en,00.html?tabId=1">Lexmark</a>.</p><p>Luckily there are people like <a
href="http://www.micromux.com/">this </a>guy on the internet who took the time to figure out how it works and have since published a nice simple <a
href="http://www.micromux.com/2010/11/22/airprint-for-mac-on-linux/">guide</a> about how to setup a Linux box as a AirPrint server. Mainly thanks to <a
href="http://www.cups.org/">Cups </a>and some <a
href="http://avahi.org/">Avahi</a> magic.</p><p>Sorted! And I&#8217;ve used it sufficiently to think spending an hour or so setting it up was worth while.</p> ]]></content:encoded> <wfw:commentRss>http://usefulthings.org.uk/2011/03/airprint-for-ios-on-linux/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Upgrading through every version of windows</title><link>http://usefulthings.org.uk/2011/03/upgrading-through-every-version-of-windows/</link> <comments>http://usefulthings.org.uk/2011/03/upgrading-through-every-version-of-windows/#comments</comments> <pubDate>Mon, 14 Mar 2011 10:30:42 +0000</pubDate> <dc:creator>robin</dc:creator> <category><![CDATA[usefulthings]]></category> <category><![CDATA[Windows]]></category> <guid
isPermaLink="false">http://riviera.org.uk/?p=1664</guid> <description><![CDATA[This guy takes a computer with MSDOS 5.0 installed and then upgrades through every major version of Windows all the way up to Windows 7. ]]></description> <content:encoded><![CDATA[<p>This guy takes a computer with MSDOS 5.0 installed and then upgrades through every major version of Windows all the way up to Windows 7.</p><p><iframe
title="YouTube video player" width="600" height="480" src="http://www.youtube.com/embed/vPnehDhGa14" frameborder="0" allowfullscreen></iframe></p> ]]></content:encoded> <wfw:commentRss>http://usefulthings.org.uk/2011/03/upgrading-through-every-version-of-windows/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>VMware Server VNC console</title><link>http://usefulthings.org.uk/2011/03/vmware-server-vnc-console/</link> <comments>http://usefulthings.org.uk/2011/03/vmware-server-vnc-console/#comments</comments> <pubDate>Sat, 12 Mar 2011 13:25:43 +0000</pubDate> <dc:creator>robin</dc:creator> <category><![CDATA[Update]]></category> <category><![CDATA[usefulthings]]></category> <category><![CDATA[VMware]]></category> <category><![CDATA[vnc]]></category> <guid
isPermaLink="false">http://riviera.org.uk/?p=1670</guid> <description><![CDATA[I use a Mac as my desktop and I&#8217;ve never successfully gotten the VMware Server console thing in the web interface to work. Which means if I need console access to a VM I have to boot a copy of windows somewhere and use IE in that.  This little trick gets me out of having [...]]]></description> <content:encoded><![CDATA[<p>I use a Mac as my desktop and I&#8217;ve never successfully gotten the VMware Server console thing in the web interface to work. Which means if I need console access to a VM I have to boot a copy of windows somewhere and use IE in that.  This little trick gets me out of having to to that.</p><p>Add the following lines to the VMX config file for each VM you want access to, then you can just connect in with any VNC client and get the console. Use the host/ip address of the vmware server itself when you connect. I halted each of my VMs while editing that file because I wan&#8217;t to make sure VMware wasn&#8217;t going to write to the file as well.</p><pre>RemoteDisplay.vnc.enabled = "TRUE"
RemoteDisplay.vnc.password = "password"
RemoteDisplay.vnc.port = "port"</pre><p>If you want more than one VM to use VNC you have to use different port numbers.</p> ]]></content:encoded> <wfw:commentRss>http://usefulthings.org.uk/2011/03/vmware-server-vnc-console/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>IPTC Copying Headline to Title fields</title><link>http://usefulthings.org.uk/2011/03/iptc-copying-headline-to-title-fields/</link> <comments>http://usefulthings.org.uk/2011/03/iptc-copying-headline-to-title-fields/#comments</comments> <pubDate>Mon, 07 Mar 2011 14:40:27 +0000</pubDate> <dc:creator>robin</dc:creator> <category><![CDATA[exiftool]]></category> <category><![CDATA[metadata]]></category> <category><![CDATA[unix]]></category> <category><![CDATA[usefulthings]]></category> <category><![CDATA[photos]]></category> <guid
isPermaLink="false">http://riviera.org.uk/?p=1650</guid> <description><![CDATA[This little problem hit me at the weekend, it turns out the fix is trivial but it took me a while reading through the docs to get things working in a way I was completely happy with. I use the IPTC Headline field in my image management software for the title of the image, this [...]]]></description> <content:encoded><![CDATA[<p>This little problem hit me at the weekend, it turns out the fix is trivial but it took me a while reading through the docs to get things working in a way I was completely happy with.</p><p>I use the IPTC Headline field in my image management software for the title of the image, this has always worked ok for me and the Flickr upload I use works fine with it. But just recently I have started to use the excellent <a
href="http://wordpress.org/extend/plugins/nextgen-gallery/">NextGEN</a> gallery plugin for <a
href="http://wordpress.org/">WordPress</a>. This seems to use the XMP field Title instead of IPTC Headline. I&#8217;m not up for changing what I use in the photo management software so I figured I must be able to write one field into another in the meta data.</p><p>It turns out <a
href="http://www.sno.phy.queensu.ca/~phil/exiftool/">exiftool</a> can now manipulate a lot more than just exif data! I don&#8217;t think I&#8217;ve had any reason to use it to probably 5 years or more. It can easily copy one field to another within the same image, the command line I use is:</p><pre>exiftool -tagsfromfile %f.jpg -ext jpg -"IPTC:headline&gt;XMP:title" \</pre><pre>-overwrite_original &lt;directory&gt;</pre><p>This command tells exiftool to read the tags from all the images with the jpg extension in the named directory, and then replace the XMP:title tag with the contents of IPTC:headline. The final option &#8220;-overwrite_original&#8221; dispenses with the backup copies exiftool normally creates.  You might not want to use this, but in my workflow the images I&#8217;m processing with this are exports of the originals, not the originals. So if anything screws up I simply have to export them again.</p><p>I&#8217;m terrible at remembering syntax, so I&#8217;ve wrapped this command in a quick bash script which is below incase it is of any use.</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #007800;">$1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Must provide a directory name, . is acceptable&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000; font-weight: bold;">!</span> <span style="color: #660033;">-d</span> <span style="color: #007800;">$1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$1 is not a directory&quot;</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Run exiftool and copy IPTC Headline to XMP Title for everything in given dir</span>
exiftool <span style="color: #660033;">-tagsfromfile</span> <span style="color: #000000; font-weight: bold;">%</span>f.jpg <span style="color: #660033;">-ext</span> jpg -<span style="color: #ff0000;">&quot;IPTC:headline&gt;XMP:title&quot;</span> \
 -overwrite_original <span style="color: #007800;">$1</span></pre></div></div> ]]></content:encoded> <wfw:commentRss>http://usefulthings.org.uk/2011/03/iptc-copying-headline-to-title-fields/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Some RPMS</title><link>http://usefulthings.org.uk/2011/02/some-rpms/</link> <comments>http://usefulthings.org.uk/2011/02/some-rpms/#comments</comments> <pubDate>Mon, 28 Feb 2011 20:00:05 +0000</pubDate> <dc:creator>robin</dc:creator> <category><![CDATA[Fedora]]></category> <category><![CDATA[Redhat/Centos]]></category> <category><![CDATA[RPM]]></category> <category><![CDATA[usefulthings]]></category> <category><![CDATA[packages]]></category> <category><![CDATA[rpms]]></category> <guid
isPermaLink="false">http://riviera.org.uk/?p=1631</guid> <description><![CDATA[I notice that occasionally the RPMs I mentioned in this post do indeed get downloaded. I&#8217;ve been adding the odd package as and when I need it and I haven&#8217;t been able to find a RPM. Also I&#8217;ve built some of those original RPMS for new distributions or architectures (x86_64 typically), so I thought maybe [...]]]></description> <content:encoded><![CDATA[<p>I notice that occasionally the RPMs I mentioned in <a
href="/2008/08/18/djbdns-daemontools-and-ucspi-tcp-rpms/">this</a> post do indeed get downloaded. I&#8217;ve been adding the odd package as and when I need it and I haven&#8217;t been able to find a RPM. Also I&#8217;ve built some of those original RPMS for new distributions or architectures (x86_64 typically), so I thought maybe I ought to write an updated post.</p><p>In the filenames, el5 is Red Hat Enterprise Linux 5 (Centos), fc7 is Fedora Core 7 and if the letters are missing it will work with rl5!</p><p>If a link is broken, feel free to have a click around the SVN repository, the root of where I keep all the RPM stuff is <a
href="http://svn.riviera.org.uk/repo/RPMS/">here</a>. Or please email <a
href="mailto:robin@riviera.org.uk">me</a>.</p><ul> <lh>daemontools</li><ul><li><a
href="http://svn.riviera.org.uk/repo/RPMS/daemontools/RPMS/i386/daemontools-0.76-1.el5.i386.rpm">daemontools-0.76-1.el5.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/daemontools/RPMS/i386/daemontools-debuginfo-0.76-1.fc7.i386.rpm">daemontools-debuginfo-0.76-1.fc7.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/daemontools/RPMS/i386/daemontools-0.76-1.fc7.i386.rpm">daemontools-0.76-1.fc7.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/daemontools/RPMS/x86_64/daemontools-0.76-1.el5.x86_64.rpm">daemontools-0.76-1.el5.x86_64.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/daemontools/SRPMS/daemontools-0.76-1.el5.src.rpm">daemontools-0.76-1.el5.src.rpm</a></ul><p><lh>djbdns</li><ul><li><a
href="http://svn.riviera.org.uk/repo/RPMS/djbdns/RPMS/i386/djbdns-1.05-1.el5.i386.rpm">djbdns-1.05-1.el5.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/djbdns/RPMS/i386/djbdns-1.05-1.fc7.i386.rpm">djbdns-1.05-1.fc7.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/djbdns/RPMS/i386/djbdns-debuginfo-1.05-1.fc7.i386.rpm">djbdns-debuginfo-1.05-1.fc7.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/djbdns/RPMS/x86_64/djbdns-1.05-1.el5.x86_64.rpm">djbdns-1.05-1.el5.x86_64.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/djbdns/SRPMS/djbdns-1.05-1.el5.src.rpm">djbdns-1.05-1.el5.src.rpm</a></ul><p><lh>haproxy</li><ul><li><a
href="http://svn.riviera.org.uk/repo/RPMS/haproxy/RPMS/i386/haproxy-1.4.10-1.el5.i386.rpm">haproxy-1.4.10-1.el5.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/haproxy/RPMS/x86_64/haproxy-1.4.10-1.el5.x86_64.rpm">haproxy-1.4.10-1.el5.x86_64.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/haproxy/SRPMS/haproxy-1.4.10-1.el5.src.rpm">haproxy-1.4.10-1.el5.src.rpm</a></ul><p><lh>isync</li><ul><li><a
href="http://svn.riviera.org.uk/repo/RPMS/isync/RPMS/i386/isync-1.0.4-2.el5.i386.rpm">isync-1.0.4-2.el5.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/isync/RPMS/x86_64/isync-1.0.4-2.el5.x86_64.rpm">isync-1.0.4-2.el5.x86_64.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/isync/RPMS/x86_64/isync-1.0.4-1.x86_64.rpm">isync-1.0.4-1.x86_64.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/isync/SRPMS/isync-1.0.4-2.el5.src.rpm">isync-1.0.4-2.el5.src.rpm</a></ul><p><lh>keepalived</li><ul><li><a
href="http://svn.riviera.org.uk/repo/RPMS/keepalived/RPMS/i386/keepalived-1.2.1-5.el5.i386.rpm">keepalived-1.2.1-5.el5.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/keepalived/RPMS/i386/keepalived-1.1.19-5.el5.i386.rpm">keepalived-1.1.19-5.el5.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/keepalived/RPMS/x86_64/keepalived-1.1.19-5.el5.x86_64.rpm">keepalived-1.1.19-5.el5.x86_64.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/keepalived/RPMS/x86_64/keepalived-1.2.1-5.el5.x86_64.rpm">keepalived-1.2.1-5.el5.x86_64.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/keepalived/SRPMS/keepalived-1.2.1-5.el5.src.rpm">keepalived-1.2.1-5.el5.src.rpm</a></ul><p><lh>netatalk</li><ul><li><a
href="http://svn.riviera.org.uk/repo/RPMS/netatalk/RPMS/i386/netatalk-2.0.5-2.el5.i386.rpm">netatalk-2.0.5-2.el5.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/netatalk/RPMS/i386/netatalk-devel-2.0.5-2.el5.i386.rpm">netatalk-devel-2.0.5-2.el5.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/netatalk/RPMS/x86_64/netatalk-devel-2.0.5-2.el5.x86_64.rpm">netatalk-devel-2.0.5-2.el5.x86_64.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/netatalk/RPMS/x86_64/netatalk-2.0.5-2.el5.x86_64.rpm">netatalk-2.0.5-2.el5.x86_64.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/netatalk/SRPMS/netatalk-2.0.5-2.el5.src.rpm">netatalk-2.0.5-2.el5.src.rpm</a></ul><p><lh>ucspi-tcp</li><ul><li><a
href="http://svn.riviera.org.uk/repo/RPMS/ucspi-tcp/RPMS/i386/ucspi-tcp-debuginfo-0.88-1.fc7.i386.rpm">ucspi-tcp-debuginfo-0.88-1.fc7.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/ucspi-tcp/RPMS/i386/ucspi-tcp-0.88-1.el5.i386.rpm">ucspi-tcp-0.88-1.el5.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/ucspi-tcp/RPMS/i386/ucspi-tcp-0.88-1.fc7.i386.rpm">ucspi-tcp-0.88-1.fc7.i386.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/ucspi-tcp/RPMS/x86_64/ucspi-tcp-0.88-1.el5.x86_64.rpm">ucspi-tcp-0.88-1.el5.x86_64.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/ucspi-tcp/SRPMS/ucspi-tcp-0.88-1.el5.src.rpm">ucspi-tcp-0.88-1.el5.src.rpm</a></ul><p><lh>wakeonlan</li><ul><li><a
href="http://svn.riviera.org.uk/repo/RPMS/wakeonlan/RPMS/noarch/wakeonlan-0.41-0.fdr.1.noarch.rpm">wakeonlan-0.41-0.fdr.1.noarch.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/wakeonlan/RPMS/noarch/wakeonlan-0.41-1.el5.noarch.rpm">wakeonlan-0.41-1.el5.noarch.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/wakeonlan/SRPMS/wakeonlan-0.41-0.fdr.1.src.rpm">wakeonlan-0.41-0.fdr.1.src.rpm</a><li><a
href="http://svn.riviera.org.uk/repo/RPMS/wakeonlan/SRPMS/wakeonlan-0.41-1.el5.src.rpm">wakeonlan-0.41-1.el5.src.rpm</a></ul></ul> ]]></content:encoded> <wfw:commentRss>http://usefulthings.org.uk/2011/02/some-rpms/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>RedHat Enterprise Linux 5 Encrypted Microsoft Active Directory Authentication</title><link>http://usefulthings.org.uk/2011/01/redhat-enterprise-linux-5-encrypted-microsoft-active-directory-authentication/</link> <comments>http://usefulthings.org.uk/2011/01/redhat-enterprise-linux-5-encrypted-microsoft-active-directory-authentication/#comments</comments> <pubDate>Mon, 17 Jan 2011 17:17:55 +0000</pubDate> <dc:creator>robin</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Redhat/Centos]]></category> <category><![CDATA[Update]]></category> <category><![CDATA[usefulthings]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[Active Directory]]></category> <category><![CDATA[encryption]]></category> <category><![CDATA[ldap]]></category> <category><![CDATA[Microsoft]]></category> <category><![CDATA[RHEL]]></category> <category><![CDATA[SSL]]></category> <category><![CDATA[TLS]]></category> <guid
isPermaLink="false">http://usefulthings.org.uk/?p=261</guid> <description><![CDATA[So after a few hours getting Linux authenticating happily from Active Directory, I turned my attention to getting it all working with encryption. Initially I had tried a telnet to port 636 (the LDAPS port) which failed, so it didnt look like my AD box was talking LDAPS. Somewhere to start I guess! So after [...]]]></description> <content:encoded><![CDATA[<div
id="_mcePaste">So after a few hours getting Linux authenticating happily from Active Directory, I turned my attention to getting it all working with encryption.</div><div></div><div
id="_mcePaste">Initially I had tried a telnet to port 636 (the LDAPS port) which failed, so it didnt look like my AD box was talking LDAPS. Somewhere to start I guess!</div><p>So after a few hours getting Linux authenticating happily from Active Directory, I turned my attention to getting it all working with encryption.</p><p>Initially I had tried a telnet to port 636 (the LDAPS port) which failed, so it didnt look like my AD box was talking LDAPS. Somewhere to start I guess!</p><p><span
id="more-978"></span></p><p><strong>Enabling LDAPS in AD</strong></p><p>I followed <a
href="http://support.microsoft.com/kb/321051">this</a> article to the letter, which lead me on a slightly convoluted path because I ended up making another 2003R2 server to act as a Certificate Server, before finally getting it all working. I called upon the excellent <a
href="http://support.microsoft.com/kb/224543">ldap.exe</a> again which is handy to prove its all working using SSL.</p><h2>LDAP command line tools</h2><p>Before poking around with actually making authentication work, I wanted to make the useful command line tools, like ldapsearch work with an encrypted connection. This turned out to be remarkably simple.  You just have to change <tt>ldap://</tt> to <tt>ldaps://</tt> and if you are working with self-signed certificates (as I am) you need to add <tt>TLS_REQCERT never</tt> to /etc/openldap.conf, meaning my file now looked like this:</p><p><code><br
/> URI ldap://adserver.112.riviera.org.uk<br
/> BASE dc=112,dc=riviera,dc=org,dc=uk<br
/> TLS_REQCERT never<br
/> </code></p><p>With that done, running the following command ought to return the same set of data as it did before you enabled encryption, but this time if you use <a
href="http://www.wireshark.org/">Wireshark</a> or something <a
href="http://www.tcpdump.org/">similar</a> you should see no unencrypted LDAP traffic.</p><p><code><br
/> ldapsearch -x -LLL -E pr=200/noprompt -D "bindaccount@112.riviera.org.uk" -w $PASSWORD -s sub "(cn=*)" cn mail sn<br
/> </code></p><h2>nss_ldap config</h2><p>Lastly you&#8217;ll actually want to configure the <code>/etc/ldap.conf</code> file which the nss_ldap packages use, this is also very simple. First, you have a choice to make, do you want pre LDAPv3 style SSL with LDAP over the top or to you want to use LDAPv3 only TLS. The library supports both, and they both work fine against Windows 2003R2 AD. The <code>ssl off</code> entry in the config file needs to be changed to one of:</p><ul><li><code>ssl on</code> &#8211; Use pre LDAPv3 SSL</li><li><code>ssl start_tls</code> &#8211; Use LDAPv3 and greater TLS</li></ul><p>As I said, either work with AD, so which you choose is up to you, or any local security polcies</p><p>With that changed, I also needed to add in a second line, to disable rootCA certificate checking, because of my self-signed cert. With that change made as well, my final <code>/etc/ldap.conf</code> file looked like:</p><p><code><br
/> host 192.168.254.14<br
/> base dc=112,dc=riviera,dc=org,dc=uk<br
/> binddn bindaccount@112.riviera.org.uk<br
/> bindpw $BINDPASSWORD<br
/> scope sub<br
/> </code><code><br
/> ssl start_tls<br
/> tls_checkpeer no<br
/> </code><code><br
/> timelimit 10<br
/> bind_timelimit 10<br
/> idle_timelimit 3600<br
/> nss_initgroups_ignoreusers root,ldap,named,avahi,haldaemon,dbus,radvd,tomcat,radiusd,news,mailman,nscd,gdm<br
/> nss_base_passwd         dc=112,dc=riviera,dc=org,dc=uk?sub<br
/> nss_base_shadow         dc=112,dc=riviera,dc=org,dc=uk?sub<br
/> nss_base_group          dc=112,dc=riviera,dc=org,dc=uk?sub?&amp;(objectCategory=group)(gidnumber=*)<br
/> nss_map_objectclass posixAccount user<br
/> nss_map_objectclass shadowAccount user<br
/> nss_map_objectclass posixGroup group<br
/> nss_map_attribute gecos cn<br
/> nss_map_attribute homeDirectory unixHomeDirectory<br
/> nss_map_attribute uniqueMember member<br
/> </code></p><p>With this file changed, all your authentication traffic should now be running over an encrypted link.  With a network sniffer, you can clearly see the differences between having <code>ssl on</code> and <code>ssl start_tls</code> set in the config file.</p><p>Hope that helps somebody, its the second time I&#8217;ve done this and last time I didnt write it down, hopefully next time I wont spend so long going over old ground!</p> ]]></content:encoded> <wfw:commentRss>http://usefulthings.org.uk/2011/01/redhat-enterprise-linux-5-encrypted-microsoft-active-directory-authentication/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>RedHat Enterprise Linux 5 Microsoft Active Directory Authentication</title><link>http://usefulthings.org.uk/2011/01/redhat-enterprise-linux-5-microsoft-active-directory-authentication/</link> <comments>http://usefulthings.org.uk/2011/01/redhat-enterprise-linux-5-microsoft-active-directory-authentication/#comments</comments> <pubDate>Fri, 14 Jan 2011 16:54:29 +0000</pubDate> <dc:creator>robin</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Redhat/Centos]]></category> <category><![CDATA[Update]]></category> <category><![CDATA[usefulthings]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[Active Directory]]></category> <category><![CDATA[ldap]]></category> <category><![CDATA[Microsoft]]></category> <category><![CDATA[RHEL]]></category> <guid
isPermaLink="false">http://usefulthings.org.uk/?p=239</guid> <description><![CDATA[Today I set out to get RHEL 5.x (Specifically 5.5) to authenticate from a Windows 2003 R2 Active Directory. I used plenty of web pages, none of which were 100% correct for my setup, so I thought I&#8217;d document exactly what I did here for my own future reference, if anybody else finds it useful, [...]]]></description> <content:encoded><![CDATA[<p>Today I set out to get RHEL 5.x (Specifically 5.5) to authenticate from a Windows 2003 R2 Active Directory. I used plenty of web pages, none of which were 100% correct for my setup, so I thought I&#8217;d document exactly what I did here for my own future reference, if anybody else finds it useful, so much the better. To start with, thanks to the following pages, between them, they got me about 80% of the way there:</p><ul><li>Scott Lowe has a useful howto <a
href="http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/">here</a>. It is version 4 currently, click around his site to ensure he hasnt updated it before you use it as a reference.</li><li>The second resource I used is <a
href="http://datadyne.wordpress.com/2010/03/04/red-hat-authentication-to-active-directory/">here</a>.</li></ul><p><span
id="more-976"></span></p><h2>Required RPMs</h2><p>You need a few packages installed, some of which are likely to be installed already, some not. The ones I have, with their versions are:</p><ul><li>nss_ldap-253-25.el5</li><li>krb5-libs-1.6.1-36.el5_5.6</li><li>openldap-2.3.43-12.el5_5.3</li><li>ntp-4.2.2p1-9.el5.centos.2.1</li></ul><p>I also found it useful to have openldap-clients-2.3.43-12.el5_5.3 installed as well, because that gives you ldapsearch, which is handy for debugging and testing things.</p><h2>Names</h2><p>In all of the following these names have been used:</p><ul><li>bindaccount &#8211; The name of the simple account inside AD for binding</li><li>112.riviera.org.uk &#8211; The DNS name of my domain</li><li>ONEONETWO &#8211; The other (windows!?) name of my domain</li><li>adserver.112.riviera.org.uk &#8211; the fqdn of my AD</li><li>dc=112,dc=riviera,dc=org,dc=uk &#8211; My BaseDN, (I used the handy ldp.exe to find this, from <a
href="http://support.microsoft.com/kb/224543">this</a> KB Article)</li></ul><h2>Active Directory</h2><p>The blog post from <a
href="http://blog.scottlowe.org/2007/01/15/linux-ad-integration-version-4/">Scott Lowe</a>, explains about adding in the &#8220;Server for NIS&#8221; stuff into Windows, so I wont go into that here. Suffice to say, in any practical sense, you need it installed. One other thing to note is that the DNS service on the AD machines really likes to know about your new linux client. I created a A record with the associated PTR record for all the new Linux clients which were going to join the domain. Doing this before you start makes life easier later. I added a couple of test users into AD before starting to configure the Linux end too, the settings on &#8216;UNIX Attributes&#8217; tab are shown below</p><p><img
class="aligncenter size-full wp-image-251" title="AD UNIX Attributes" src="http://riviera.org.uk/wp-content/uploads/2011/01/Screen-shot-2011-01-14-at-16.46.381.png" alt="" width="411" height="486" /></p><h2>Linux Setup</h2><p>Before touching any config files make sure your client has its own IP and FQDN listed in /etc/hosts. Also make sure time is syncronised with AD, a default AD install puts a time server up for you, so you could use that, whatever you use, make sure they are in sync. The files I modified and what they ended up looking like are as follows, in all cases except for nsswitch.conf these are the entire files, so feel free to copy and paste and kill what is already there.</p><h2>/etc/openldap/ldap.conf</h2><p>This file configures the openldap clients, not strictly neccerssary, but useful to ensure you can talk ldap to your AD. Once this file is written you should be able to query AD with the following command</p><p><code>ldapsearch -x -LLL -E pr=200/noprompt -D "bindaccount@112.riviera.org.uk" -w $PASSWORD -s sub "(cn=*)" cn mail sn</code></p><p>I&#8217;ve put my password in a bash variable, just replace $PASSWORD with yours, if this fails then try the full command, which wont be using any defaults from /etc/openldap/ldap.conf:</p><p><code>ldapsearch -x -LLL -E pr=200/noprompt -h adserver.112.riviera.org.uk -D "bindaccount@112.riviera.org.uk" -w $PASSWORD -b "dc=112,dc=riviera,dc=org,dc=uk" -s sub "(cn=*)" cn mail sn</code></p><p>If that also fails you might want to try telneting to the LDAP port on the AD box, to see if that is open</p><p>My ldap.conf only has the following in it:</p><p><code><br
/> URI ldap://adserver.112.riviera.org.uk<br
/> BASE dc=112,dc=riviera,dc=org,dc=uk<br
/> </code></p><h2>/etc/krb5.conf</h2><p><code><br
/> [logging]<br
/> default = FILE:/var/log/krb5libs.log<br
/> kdc = FILE:/var/log/krb5kdc.log<br
/> admin_server = FILE:/var/log/kadmind.log<br
/> </code><code><br
/> [libdefaults]<br
/> default_realm = 112.RIVIERA.ORG.UK<br
/> dns_lookup_realm = false<br
/> dns_lookup_kdc = false<br
/> ticket_lifetime = 24h<br
/> forwardable = yes<br
/> </code><code><br
/> [realms]<br
/> 112.RIVIERA.ORG.UK = {<br
/> kdc = adserver.112.riviera.org.uk<br
/> admin_server = adserver.112.riviera.org.uk<br
/> default_domain = 112.riviera.org.uk<br
/> }<br
/> </code><code><br
/> [domain_realm]<br
/> .112.riviera.org.uk = 112.RIVIERA.ORG.UK<br
/> 112.riviera.org.uk = 112.RIVIERA.ORG.UK<br
/> </code><code><br
/> [appdefaults]<br
/> pam = {<br
/> debug = false<br
/> ticket_lifetime = 36000<br
/> renew_lifetime = 36000<br
/> forwardable = true<br
/> krb4_convert = false<br
/> }<br
/> </code></p><h2>/etc/ldap.conf</h2><p><code><br
/> host 192.168.254.14<br
/> base dc=112,dc=riviera,dc=org,dc=uk<br
/> binddn bindaccount@112.riviera.org.uk<br
/> bindpw $BINDPASSWORD<br
/> scope sub<br
/> ssl no<br
/> timelimit 10<br
/> bind_timelimit 10<br
/> idle_timelimit 3600<br
/> nss_initgroups_ignoreusers root,ldap,named,avahi,haldaemon,dbus,radvd,tomcat,radiusd,news,mailman,nscd,gdm<br
/> nss_base_passwd         dc=112,dc=riviera,dc=org,dc=uk?sub<br
/> nss_base_shadow         dc=112,dc=riviera,dc=org,dc=uk?sub<br
/> nss_base_group          dc=112,dc=riviera,dc=org,dc=uk?sub?&amp;(objectCategory=group)(gidnumber=*)<br
/> nss_map_objectclass posixAccount user<br
/> nss_map_objectclass shadowAccount user<br
/> nss_map_objectclass posixGroup group<br
/> nss_map_attribute gecos cn<br
/> nss_map_attribute homeDirectory unixHomeDirectory<br
/> nss_map_attribute uniqueMember member<br
/> </code></p><h2>/etc/pam.d/system-auth</h2><p><code><br
/> #%PAM-1.0<br
/> # This file is auto-generated.<br
/> # User changes will be destroyed the next time authconfig is run.<br
/> auth        required      pam_env.so<br
/> auth        sufficient    pam_unix.so nullok try_first_pass<br
/> auth        requisite     pam_succeed_if.so uid &gt;= 500 quiet<br
/> auth        sufficient    pam_krb5.so use_first_pass<br
/> auth        sufficient    pam_ldap.so use_first_pass<br
/> auth        required      pam_deny.so<br
/> </code><code><br
/> account     required      pam_unix.so<br
/> account     sufficient    pam_succeed_if.so uid &lt; 500 quiet<br
/> account     [default=bad success=ok user_unknown=ignore] pam_krb5.so<br
/> account     [default=bad success=ok user_unknown=ignore] pam_ldap.so<br
/> account     required      pam_permit.so<br
/> </code><code><br
/> password    requisite     pam_cracklib.so try_first_pass retry=3<br
/> password    sufficient    pam_unix.so md5 shadow nullok try_first_pass use_authtok<br
/> password    sufficient    pam_krb5.so use_authtok<br
/> password    sufficient    pam_ldap.so use_authtok<br
/> password    required      pam_deny.so<br
/> </code><code><br
/> session     required      /lib/security/pam_mkhomedir.so skel=/etc/skel/ umask=0022<br
/> session     optional      pam_keyinit.so revoke<br
/> session     required      pam_limits.so<br
/> session     [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid<br
/> session     required      pam_unix.so<br
/> session     optional      pam_krb5.so<br
/> session     optional      pam_ldap.so<br
/> </code></p><h2>/etc/nsswitch.conf</h2><p>I have not included all of nsswitch.conf here because I only changed the following three lines. Simply add ldap after files for each.</p><p><code><br
/> passwd:     files ldap<br
/> shadow:     files ldap<br
/> group:      files ldap<br
/> </code></p><h2>/etc/samba/smb.conf</h2><p><code><br
/> workgroup = ONEONETWO<br
/> security = ads<br
/> realm = 112.riviera.org.uk<br
/> use kerberos keytab = true<br
/> password server = adserver.112.riviera.org.uk<br
/> </code></p><h2>Finished!</h2><p>When all that is done and working you should be able to run &#8216;getent passwd &#8216; and have it return your passwd file entry from AD. You should also be able to su to the user, and login via either console or SSH. If the users home directory isnt created, pam should create it for you.</p><p>Next on my list is to make all this work with encrypted LDAP.</p> ]]></content:encoded> <wfw:commentRss>http://usefulthings.org.uk/2011/01/redhat-enterprise-linux-5-microsoft-active-directory-authentication/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Back to Windows</title><link>http://usefulthings.org.uk/2011/01/back-to-windows/</link> <comments>http://usefulthings.org.uk/2011/01/back-to-windows/#comments</comments> <pubDate>Tue, 04 Jan 2011 23:25:37 +0000</pubDate> <dc:creator>robin</dc:creator> <category><![CDATA[dumb]]></category> <category><![CDATA[Update]]></category> <category><![CDATA[Windows]]></category> <guid
isPermaLink="false">http://riviera.org.uk/?p=751</guid> <description><![CDATA[After nearly 7 weeks without having to suffer Windows in any of its incarnations, I returned to work today and had the pleasure of XP on my horribly clunky Thinkpad. Very shortly after booting it I was presented with the following error message. What a wonderful dialogue box and what a &#8216;Useful tip&#8217;. A Google [...]]]></description> <content:encoded><![CDATA[<p>After nearly 7 weeks without having to suffer Windows in any of its incarnations, I returned to work today and had the pleasure of XP on my horribly clunky Thinkpad. Very shortly after booting it I was presented with the following error message.</p><p><a
href="http://riviera.org.uk/wp-content/uploads/2011/01/Skype-Tip.jpg"><img
class="aligncenter size-full wp-image-752" title="Skype-Tip" src="http://riviera.org.uk/wp-content/uploads/2011/01/Skype-Tip.jpg" alt="" width="456" height="108" /></a></p><p>What a wonderful dialogue box and what a &#8216;Useful tip&#8217;. A Google <a
href="http://www.google.co.uk/search?q=BSTAC~1.exe">search </a>suggests it is something to do with the Windows Bluetooth stack. Oh I dont fucking care you stupid program, I just wanted to message somebody, you worked 7 weeks ago, why are you arsing around now.</p><p>As an aside, I notice the 8.3 filename, which still at some level seems to exist in Windows XP. How quaint of it!</p> <img
src="http://feeds.feedburner.com/~r/RobinsPhotoblog/~4/MinM1nEMesI" height="1" width="1"/>]]></content:encoded> <wfw:commentRss>http://usefulthings.org.uk/2011/01/back-to-windows/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Adding iscsi devices</title><link>http://usefulthings.org.uk/2010/11/adding-iscsi-devices/</link> <comments>http://usefulthings.org.uk/2010/11/adding-iscsi-devices/#comments</comments> <pubDate>Fri, 19 Nov 2010 13:00:26 +0000</pubDate> <dc:creator>robin</dc:creator> <category><![CDATA[Redhat/Centos]]></category> <category><![CDATA[Update]]></category> <category><![CDATA[usefulthings]]></category> <category><![CDATA[centos]]></category> <category><![CDATA[iscs]]></category> <category><![CDATA[RedHat]]></category> <guid
isPermaLink="false">http://usefulthings.org.uk/?p=235</guid> <description><![CDATA[[root@sn-b07-a ~]# iscsiadm -m session tcp: [9] 172.16.4.201:3260,1 iqn.1984-05.com.dell:powervault.6001c23000cd3f8300000000485684e3 tcp: [10] 172.16.4.202:3260,2 iqn.1984-05.com.dell:powervault.6001c23000cd3f8300000000485684e3 tcp: [11] 172.16.5.202:3...]]></description> <content:encoded><![CDATA[<p><code>[root@sn-b07-a ~]# iscsiadm -m session<br
/> tcp: [9] 172.16.4.201:3260,1 iqn.1984-05.com.dell:powervault.6001c23000cd3f8300000000485684e3<br
/> tcp: [10] 172.16.4.202:3260,2 iqn.1984-05.com.dell:powervault.6001c23000cd3f8300000000485684e3<br
/> tcp: [11] 172.16.5.202:3260,2 iqn.1984-05.com.dell:powervault.6001c23000cd3f8300000000485684e3<br
/> tcp: [12] 172.16.5.201:3260,1 iqn.1984-05.com.dell:powervault.6001c23000cd3f8300000000485684e3<br
/> [root@sn-b07-a ~]# iscsiadm -m session -r 9 --rescan</code></p><p>From <a
href="http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/scanningnewdevs-iscsi.html">here</a>.</p> ]]></content:encoded> <wfw:commentRss>http://usefulthings.org.uk/2010/11/adding-iscsi-devices/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
