<?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>My life et al. &#187; admin</title>
	<atom:link href="http://florian-feldhaus.de/tag/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://florian-feldhaus.de</link>
	<description></description>
	<lastBuildDate>Wed, 05 Oct 2011 19:09:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-RC2</generator>
		<item>
		<title>Retrieve (personal) certificates from Firefox profile</title>
		<link>http://phacker.org/2010/10/12/retrieve-personal-certificates-from-firefox-profile/</link>
		<comments>http://phacker.org/2010/10/12/retrieve-personal-certificates-from-firefox-profile/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 08:45:19 +0000</pubDate>
		<dc:creator>ffeldhaus</dc:creator>
				<category><![CDATA[syndicated]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[certificates]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://phacker.org/?p=418</guid>
		<description><![CDATA[Recently my harddisk crashed and I used  &#8230; <a href="http://phacker.org/2010/10/12/retrieve-personal-certificates-from-firefox-profile/">Continue reading <span class="meta-nav">&#8594;</span></a> <a href="http://phacker.org/2010/10/12/retrieve-personal-certificates-from-firefox-profile/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently my harddisk crashed and I used this opportunity to reinstall my system. Everything went fine, but getting my user certificates back turned out to be a bit tricky. For Grid Computing and administrating a Grid Site I need my certificates to be stored in the browser. As I recently renewed them, I haven&#8217;t done a backup of them (shame on me) so I couldn&#8217;t just reimport them in my newly installed Firefox 4 (beta). Here is what I did to get the certificates back from my old Firefox profile:</p>
<ol>
<li>Find out where your profile folder is located. <a href="http://kb.mozillazine.org/Profile_folder_-_Firefox">This Mozillazine Page might help.</a></li>
<li>Quit Firefox if it is still running</li>
<li>Go to the profile folder of your new Firefox installation and backup the files cert8.db and key3.db</li>
<li>Copy key3.db from your old profile folder to your new one if you want to restore your private/user certificates</li>
<li>Copy cert8.db from your old profile folder to your new one if you want to restore all other certificates you had installed in Firefox (e.g. root certificates and host certificates)</li>
</ol>
<!-- PHP 5.x --><p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://phacker.org/2010/10/12/retrieve-personal-certificates-from-firefox-profile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find out number of cores / CPUs for a linux system</title>
		<link>http://phacker.org/2010/09/07/find-out-number-of-cores-cpus-for-a-linux-system/</link>
		<comments>http://phacker.org/2010/09/07/find-out-number-of-cores-cpus-for-a-linux-system/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 21:42:34 +0000</pubDate>
		<dc:creator>ffeldhaus</dc:creator>
				<category><![CDATA[syndicated]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[proc]]></category>

		<guid isPermaLink="false">http://phacker.org/?p=411</guid>
		<description><![CDATA[If you need to find out the number of CP &#8230; <a href="http://phacker.org/2010/09/07/find-out-number-of-cores-cpus-for-a-linux-system/">Continue reading <span class="meta-nav">&#8594;</span></a> <a href="http://phacker.org/2010/09/07/find-out-number-of-cores-cpus-for-a-linux-system/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you need to find out the number of CPUs or CPU cores or cores per CPU of your system, you could look it up in /proc/cpuinfo but it&#8217;s quite hard to figure out the right parameters. <a href="http://www.richweb.com/cpu_info" >A good overview on the parameters for different system configurations can be found here.</a> If you want to put the actual numbers in variables, here is a nice way to do it:</p>
<pre>export CORES_PER_CPU=`grep -c "physical id.*: 0" /proc/cpuinfo`
export CPU_TOTAL=`grep -c "core id.*: 0" /proc/cpuinfo`
export CORE_TOTAL=`grep -c processor /proc/cpuinfo`</pre>
<p>/proc/cpuinfo shows an entry for each CPU core. The <em>physical id</em> is incremented for each physical CPU. If the entry has the same <em>physical id</em> as another core, the core belongs to the same CPU. Therefore counting the number of entries with physical id set to 0 results in the number of cores per CPU. The <em>core id</em> is incremented for each core on a physical CPU. Therefore counting the number of entries with <em>core id</em> set to 0 results in the number of physical CPUs. The total number of cores can be retrieved quite easily by counting the number of <em>processor</em> entries.</p>
<p>Unfortunately the above method does not work on all systems. I noticed on some systems with single core processors, that the values <em>core id</em> and <em>physical</em> id are not present.</p>
<p>I searched for official documentation on the proc filesystem, but only found the following document which doesn&#8217;t describe the cpuinfo values:</p>
<ul>
<li><a href="http://www.kernel.org/doc/Documentation/filesystems/proc.txt" >http://www.kernel.org/doc/Documentation/filesystems/proc.txt</a></li>
</ul>
<p>If someone happens to know a better documentation I would be glad if he/she would share it with me!</p>
<!-- PHP 5.x --><p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://phacker.org/2010/09/07/find-out-number-of-cores-cpus-for-a-linux-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging an SSL connection</title>
		<link>http://phacker.org/2010/03/22/debugging-the-ssl-handshake/</link>
		<comments>http://phacker.org/2010/03/22/debugging-the-ssl-handshake/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 11:22:09 +0000</pubDate>
		<dc:creator>ffeldhaus</dc:creator>
				<category><![CDATA[syndicated]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[random rants]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://phacker.org/?p=359</guid>
		<description><![CDATA[Debugging the SSL handshake can be lots  &#8230; <a href="http://phacker.org/2010/03/22/debugging-the-ssl-handshake/">Continue reading <span class="meta-nav">&#8594;</span></a> <a href="http://phacker.org/2010/03/22/debugging-the-ssl-handshake/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Debugging the SSL handshake can be lots of pain, especially if the SSL commands are done by components not under your control. Fortunately there is a tool called <a href="http://www.rtfm.com/ssldump/" >ssldump</a> which lets you monitor the complete SSL handshake. The following command prints out detailed information about the SSL handshake (on interface eth0):</p>
<pre>ssldump -a -A -H -i eth0
</pre>
<p>If you want to sneak at the encrypted traffic you need to tell ssldump where to find the hostkey (e.g. hostkey.pem or similar) of the machine</p>
<pre>ssldump -N -d -k $PATH_TO_HOSTKEY/hostkey.pem -A -H -i eth0
</pre>
<p>Replace $PATH_TO_HOSTKEY and hostkey.pem accordingly.</p>
<p><a href="http://prefetch.net/articles/debuggingssl.html" >More information can be found here</a> or in the manpage of ssldump.</p>
<!-- PHP 5.x --><p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://phacker.org/2010/03/22/debugging-the-ssl-handshake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Resume (secure) copy</title>
		<link>http://phacker.org/2010/02/11/resume-secure-copy/</link>
		<comments>http://phacker.org/2010/02/11/resume-secure-copy/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 19:36:43 +0000</pubDate>
		<dc:creator>ffeldhaus</dc:creator>
				<category><![CDATA[syndicated]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[copy]]></category>
		<category><![CDATA[resume]]></category>
		<category><![CDATA[scp]]></category>

		<guid isPermaLink="false">http://phacker.org/?p=297</guid>
		<description><![CDATA[If you need to transfer big files, somet &#8230; <a href="http://phacker.org/2010/02/11/resume-secure-copy/">Continue reading <span class="meta-nav">&#8594;</span></a> <a href="http://phacker.org/2010/02/11/resume-secure-copy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you need to transfer big files, sometimes the network connection breaks down and you need to restart the transfer. Using the following command, you can start and resume (!) a file transfer:</p>
<pre><code>rsync --partial --progress </code><code>--rsh=ssh localFile</code><code> username@remoteMachine:remoteDirectory/
</code></pre>
<p>If you generally want to use the above command add the following line to your ~/.bashrc and just use the new scpresume command:</p>
<pre><code>alias scpresume="rsync --partial --progress --rsh=ssh
</code></pre>
<p>Many thanks to <a href="http://joen.dk/wordpress/?p=34" >Joen.dk</a> who came up with the idea!</p>
<!-- PHP 5.x --><p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://phacker.org/2010/02/11/resume-secure-copy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Starting Mac OS X Applications (as root) from the console</title>
		<link>http://phacker.org/2009/02/19/starting-mac-os-x-applications-as-root-from-the-console/</link>
		<comments>http://phacker.org/2009/02/19/starting-mac-os-x-applications-as-root-from-the-console/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 14:30:45 +0000</pubDate>
		<dc:creator>ffeldhaus</dc:creator>
				<category><![CDATA[syndicated]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[installer]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[open]]></category>
		<category><![CDATA[random rants]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://phacker.org/?p=109</guid>
		<description><![CDATA[I recently wanted to start Mac OS X Appl &#8230; <a href="http://phacker.org/2009/02/19/starting-mac-os-x-applications-as-root-from-the-console/">Continue reading <span class="meta-nav">&#8594;</span></a> <a href="http://phacker.org/2009/02/19/starting-mac-os-x-applications-as-root-from-the-console/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently wanted to start Mac OS X Applications from the console. Sometimes it is possible to start an application directly if it&#8217;s possible to find the executable in the application folder. But sometimes, espaccially for application installers there is no executable. In this case it is possible to start the application (or installer) by using the open command. e.g. to start TextEdit:</p>
<pre>open /Applications/TextEdit.app</pre>
<p>The open command does the same as clicking on a file / application. So you could open a pdf document like this:</p>
<pre>open document.pdf</pre>
<p>Sometimes an installer requires to run as a superuser. Starting the installer with</p>
<pre>sudo open /Applications/INSTALLER_APP</pre>
<p>unfortunately does not work, because only open will run as a superuser, but not the installer itself. To start the installer as superuser the following might help:</p>
<ul>
<li>pkg installer:</li>
<pre>sudo ./MyApplication.app/Contents/MacOS/Installer</pre>
<li>other installers (no linebreak!)</li>
<pre>sudo /System/Library/Frameworks/Carbon.framework/Versions/A/Support/LaunchCFMApp \
  ./MyApplication.app/Contents/MacOS/application</pre>
</ul>
<!-- PHP 5.x --><p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://phacker.org/2009/02/19/starting-mac-os-x-applications-as-root-from-the-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: Kickstart for Ubuntu 8.04 with LDAP Authentication</title>
		<link>http://phacker.org/2008/08/04/tutorial-kickstart-for-ubuntu-804-with-ldap-authentication/</link>
		<comments>http://phacker.org/2008/08/04/tutorial-kickstart-for-ubuntu-804-with-ldap-authentication/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 13:21:57 +0000</pubDate>
		<dc:creator>ffeldhaus</dc:creator>
				<category><![CDATA[syndicated]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[autometed installation]]></category>
		<category><![CDATA[kickstart]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://phacker.org/?p=11</guid>
		<description><![CDATA[We had to install a few Desktop computer &#8230; <a href="http://phacker.org/2008/08/04/tutorial-kickstart-for-ubuntu-804-with-ldap-authentication/">Continue reading <span class="meta-nav">&#8594;</span></a> <a href="http://phacker.org/2008/08/04/tutorial-kickstart-for-ubuntu-804-with-ldap-authentication/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We had to install a few Desktop computers with an up to date operating system like Ubuntu, because neither Scientific Linux 5.x, nor SUSE Linux Enterprise was supporting the chipset of our new workstations. But Ubuntu does.</p>
<p>To make life easier for the normal users and to have a homogeneous computing environment we decided to write a kickstart file for Ubuntu. Ubuntu has support for kickstart files, but the documentation is really outdated and quite incomplete:</p>
<ul>
<li><a title="General information to Kickstart in Ubuntu" href="https://help.ubuntu.com/community/KickstartCompatibility" >Kickstart Compatibility</a></li>
<li><a title="Information on installing Ubuntu 8.04 automatically" href="https://help.ubuntu.com/8.04/installation-guide/i386/automatic-install.html">Automatic Installation</a></li>
</ul>
<p>We needed LDAP Authentication which is currently not working with Ubuntu kickstart. The trick is to include the LDAP configuration into the %post section of the kickstart file.</p>
<h3>Creating a basic kickstart file</h3>
<p>We started creating a kickstart file using the GUI utility on a working Ubuntu installation (you may use an Ubuntu Live CD for this)</p>
<pre>system-config-kickstart</pre>
<p>which can be installed on an Ubuntu system with</p>
<pre>apt-get install system-config-kickstart</pre>
<p>You need to add a meta package like ubuntu-desktop to the kickstart file created by system-config-kickstart in the %packages section and you might want to add other packages like nfs-common:</p>
<pre>%packages
ubuntu-desktop
nfs-common</pre>
<h3>Configuration of LDAP in the kickstart file</h3>
<p>The GUI utility provides some LDAP options which unfortunately do not work with Ubuntu 8.04. So we needed to add the LDAP configuration to the post section of the kickstart file.</p>
<p>During the LDAP installation (with apt-get install) some configuration options have to be filled in interactively. To do this automatically, you can use the preseed mechanism (<a href="https://help.ubuntu.com/8.04/installation-guide/i386/preseed-creating.html" >see here for more information on preseed under Ubuntu 8.04</a>).</p>
<p>At first you have to install LDAP on your own machine (or use a livecd) and configure it interactively:</p>
<pre>apt-get install ldap-auth-client --assume-yes
auth-client-config -a -p lac_ldap</pre>
<p>After that run the followin command to get all the LDAP options</p>
<pre>debconf-get-selections | grep ldap</pre>
<p>Now you should see something like this:</p>
<pre>ldap-auth-config	ldap-auth-config/bindpw	password
ldap-auth-config	ldap-auth-config/rootbindpw	password
ldap-auth-config	ldap-auth-config/binddn	string	cn=proxyuser,dc=example,dc=net
ldap-auth-config	ldap-auth-config/dbrootlogin	boolean	false
ldap-auth-config	ldap-auth-config/rootbinddn	string	cn=manager,dc=example,dc=net
ldap-auth-config	ldap-auth-config/pam_password	select	md5
ldap-auth-config	ldap-auth-config/move-to-debconf	boolean	true
ldap-auth-config	ldap-auth-config/ldapns/ldap-server	string	ldap_server_name
ldap-auth-config	ldap-auth-config/ldapns/base-dn	string	dc=your,dc=domain,dc=tld
ldap-auth-config	ldap-auth-config/override	boolean	true
ldap-auth-config	ldap-auth-config/ldapns/ldap_version	select	3
ldap-auth-config	ldap-auth-config/dblogin	boolean	false</pre>
<p>Now include these information into your kickstart file with the preseed option. The result should look similar to this:</p>
<pre>preseed --owner ldap-auth-config ldap-auth-config/bindpw password
preseed --owner ldap-auth-config ldap-auth-config/rootbindpw password
preseed --owner ldap-auth-config ldap-auth-config/binddn string cn=proxyuser,dc=example,dc=net
preseed --owner ldap-auth-config ldap-auth-config/dbrootlogin boolean false
preseed --owner ldap-auth-config ldap-auth-config/rootbinddn string  cn=manager,dc=example,dc=net
preseed --owner ldap-auth-config ldap-auth-config/pam_password select  md5
preseed --owner ldap-auth-config ldap-auth-config/move-to-debconf boolean true
preseed --owner ldap-auth-config ldap-auth-config/ldapns/ldap-server string  ldap_server_name
preseed --owner ldap-auth-config ldap-auth-config/ldapns/base-dn string  dc=your,dc=domain,dc=tld
preseed --owner ldap-auth-config ldap-auth-config/override boolean true
preseed --owner ldap-auth-config ldap-auth-config/ldapns/ldap_version select  3
preseed --owner ldap-auth-config ldap-auth-config/dblogin boolean false</pre>
<p>In the %post section of the kickstart file add the following to install and configure LDAP</p>
<pre>%post --interpreter=/bin/bash
apt-get install ldap-auth-client --assume-yes
auth-client-config -a -p lac_ldap</pre>
<h3>Other useful stuff</h3>
<p>There are some other useful things you can put into the %post section of the kickstart file:</p>
<p>You might want to moun the home directories like this:</p>
<pre>echo "host:/export/home /home  nfs    defaults  0 0"  &gt;&gt; /etc/fstab</pre>
<p>If you want to enable auto update on a regular base you can use the package cron-apt</p>
<pre>apt-get install cron-apt --assume-yes</pre>
<p>By default the cron job just downloads the updates. To automatically install the updates you have to strip the <code>-d</code> option from the apt-get command. This can be done as following:</p>
<pre>sed -e 's/ -d / /g' /etc/cron-apt/action.d/3-download &gt; /etc/cron-apt/action.d/3-download2
mv /etc/cron-apt/action.d/3-download2 /etc/cron-apt/action.d/3-download</pre>
<p>You might want to set the rootmail user or add users to the sudoers list:</p>
<pre>### ROOTMAIL
echo "root:           rootmail@your.domain.de" &gt;&gt; /etc/aliases
### SUDOERS
echo "username ALL=(ALL) ALL" &gt;&gt; /etc/sudoers</pre>
<h3>The final kickstart file</h3>
<p><a href="http://phacker.org/files/2008/08/ubuntu_esprimo_e5920.txt">Here you can find an example kickstart file for a x64 system which you can adopt to your personal needs.</a></p>
<!-- PHP 5.x --><p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://phacker.org/2008/08/04/tutorial-kickstart-for-ubuntu-804-with-ldap-authentication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manually create linux user password hashs</title>
		<link>http://phacker.org/2008/08/01/manually-create-passwords/</link>
		<comments>http://phacker.org/2008/08/01/manually-create-passwords/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 12:32:00 +0000</pubDate>
		<dc:creator>ffeldhaus</dc:creator>
				<category><![CDATA[syndicated]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[md5]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[userdb]]></category>
		<category><![CDATA[userdbpw]]></category>

		<guid isPermaLink="false">http://phacker.org/?p=16</guid>
		<description><![CDATA[Manually creating a password under linux &#8230; <a href="http://phacker.org/2008/08/01/manually-create-passwords/">Continue reading <span class="meta-nav">&#8594;</span></a> <a href="http://phacker.org/2008/08/01/manually-create-passwords/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Manually creating a password under linux for e.g. /etc/shadow or kickstart isn&#8217;t really easy. I searched for a while until I found the userdbpw utility. On Debian Systems (including Ubuntu) it can be installed with</p>
<pre>
apt-get install courier-authlib-userdb
</pre>
<p>For most distributions the md5 algorithm is used to create passwords. The userdbpw command for md5 passwords is:</p>
<pre>
userdbpw -md5
</pre>
<p>More information on userdbpw can be found in its <a href="http://linux.die.net/man/8/userdbpw">manpage</a>.</p>
<!-- PHP 5.x --><p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://phacker.org/2008/08/01/manually-create-passwords/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

