<?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>Unified Diff &#187; Linux</title>
	<atom:link href="http://www.unifieddiff.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unifieddiff.com</link>
	<description>I should do that! How hard could it be?!</description>
	<lastBuildDate>Sat, 30 Jan 2010 01:23:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>FUSE Extension for PHP</title>
		<link>http://www.unifieddiff.com/2008/12/15/fuse-extension-for-php/</link>
		<comments>http://www.unifieddiff.com/2008/12/15/fuse-extension-for-php/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 01:24:03 +0000</pubDate>
		<dc:creator>Bob</dc:creator>
				<category><![CDATA[FUSE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.unifieddiff.com/?p=122</guid>
		<description><![CDATA[Well, it&#8217;s official&#8230; I&#8217;m a geek. A few weeks ago I started writing an extension for the PHP runtime that provides bindings to libfuse. Back up a few months&#8212; I wrote a PHP script to screen-scrape the Trac web interface and allow me to grab source code to a project I&#8217;m working on.
My solution worked [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it&#8217;s official&#8230; I&#8217;m a geek. A few weeks ago I started writing an extension for the PHP runtime that provides bindings to <a href="http://fuse.sourceforge.net/">libfuse</a>. Back up a few months&mdash; I wrote a PHP script to screen-scrape the <a href="http://trac.edgewall.org/">Trac</a> web interface and allow me to grab source code to a project I&#8217;m working on.</p>
<p>My solution worked but it was pretty ugly. So I wondered if it would be better to implement a FUSE file system to do the same task. Unfortunately PHP didn&#8217;t have bindings for libfuse at the time. After several failed attempts at using SWIG to automagically generate an extension, I came to the harsh realization that if I wanted FUSE bindings I&#8217;d have to do it myself. I mean&#8230; how hard could it be?</p>
<p>It actually wasn&#8217;t too bad. I read a bunch of non-existent documentation on the Zend API and went to work on a prototype. It took me about a week, but I now have a working PHP extension. I&#8217;ve also since implemented <a href="/projects/tracfs">TracFS</a> to replace my ugly script.</p>
<span id="more-122"></span>
<p>I&#8217;m almost finished with writing the documentation for the PHP website. To build the extension, you have to check out the sources from CVS.</p>
<pre>
$ svn co http://svn.php.net/repository/pecl/fuse/trunk/ php_fuse
$ cd php_fuse &amp;&amp; phpize
$ ./configure
$ make &amp;&amp; sudo make install
</pre>
<p>You&#8217;ll need to install PHP and FUSE (or <a href="http://code.google.com/p/macfuse/">MacFUSE</a>) before you can build the extension. Once everything is installed, you can test php_fuse with the scripts in pecl/fuse/examples. For now, the extension does not support writing files, only reading. Sometime in the near future I will implement the rest of the VFS callbacks.</p> ]]></content:encoded>
			<wfw:commentRss>http://www.unifieddiff.com/2008/12/15/fuse-extension-for-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building Amarok 1.4 on Leopard</title>
		<link>http://www.unifieddiff.com/2008/06/30/building-amarok-14-on-leopard/</link>
		<comments>http://www.unifieddiff.com/2008/06/30/building-amarok-14-on-leopard/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 18:02:39 +0000</pubDate>
		<dc:creator>Bob</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.robertjcarroll.com/?p=31</guid>
		<description><![CDATA[I love Amarok and wanted to install it on my MacBook. With Qt4 on the horizon, it will be possible to run Amarok natively in OS X without an X server. But I didn&#8217;t want to wait for Amarok2 to become stable, so I looked into compiling Amarok 1.4 and running it under X.
I tried [...]]]></description>
			<content:encoded><![CDATA[<p>I love <a href="http://amarok.kde.org/">Amarok</a> and wanted to install it on my MacBook. With Qt4 on the horizon, it will be possible to run Amarok natively in OS X without an X server. But I didn&#8217;t want to wait for Amarok2 to become stable, so I looked into compiling Amarok 1.4 and running it under X.</p>
<p>I tried following the <a href="http://amarok.kde.org/wiki/On_OS_X">On OS X</a> guide with limited success. Apparently, ffmpeg won&#8217;t compile on Leopard and that caused the entire libxine compilation to fail. I tried various combinations of configure flags, but none seemed to help. I looked at the source to try and fix it, but unfortunately I&#8217;m not terribly familiar with x86 assembly.</p>
<span id="more-31"></span>
<p>The problem code had to do with video rendering, so since Amarok doesn&#8217;t use it I just cut it out of the build process. Edit <strong>src/combined/ffmpeg/Makefile</strong> and find<br />
<pre>xineplug_LTLIBRARIES = xineplug_decode_ff.la xineplug_decode_dvaudio.la</pre>
and replace with<br />
<pre>xineplug_LTLIBRARIES = xineplug_decode_dvaudio.la</pre></p>
<p>After that, edit <strong>src/post/Makefile</strong> and find<br />
<pre>SUBDIRS = planar goom visualizations mosaico deinterlace audio</pre>
and replace with<br />
<pre>SUBDIRS = goom visualizations mosaico audio</pre>
Now libxine will build.</p>
<p>With libxine installed, I had a few more steps to build Amarok. I installed taglib<br />
<pre>$ sudo fink install taglib</pre>
I also had to specify the location of the OpenGL framework I wanted to use<br />
<pre>
LDFLAGS=&quot;-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/ \
  A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/ \
  A/Libraries/libGL.dylib&quot;
</pre>
And finally, this is how I configured Amarok<br />
<pre>./configure --prefix=/sw --with-qt-includes=/sw/include/qt \
  --with-qt-libraries=/sw/lib/qt3/lib</pre></p>
<p>I now have Amarok successfully compiled and running on Leopard. This took me quite a bit of time to get right, so I&#8217;m hoping someone else will find it useful.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unifieddiff.com/2008/06/30/building-amarok-14-on-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOW TO: Samba as an AD Domain Member</title>
		<link>http://www.unifieddiff.com/2006/10/04/samba-ad-domain-member/</link>
		<comments>http://www.unifieddiff.com/2006/10/04/samba-ad-domain-member/#comments</comments>
		<pubDate>Thu, 05 Oct 2006 01:30:55 +0000</pubDate>
		<dc:creator>Bob</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Samba]]></category>

		<guid isPermaLink="false">http://www.robertjcarroll.com/2006/10/05/samba-ad-domain-member/</guid>
		<description><![CDATA[There are probably a million and one articles about how to make Samba 3 an Active Directory domain member. But with all of that, this process still seems to require hours of research. So I&#8217;ve decided to compile my latest experiences here.
The domain member box is running Gentoo Linux. So you may need to adjust [...]]]></description>
			<content:encoded><![CDATA[<p>There are probably a million and one articles about how to make Samba 3 an Active Directory domain member. But with all of that, this process still seems to require hours of research. So I&#8217;ve decided to compile my latest experiences here.</p>
<p>The domain member box is running Gentoo Linux. So you may need to adjust the steps to fit your flavor. Make sure the USE flags kerberos, ldap, samba, ssl, and winbind are set. Start by installing an NTP client.
<pre># emerge ntp</pre></p>
<span id="more-24"></span>
<p>The purpose of NTP is to keep your computer&#8217;s clock in-sync with the domain controller. Edit your /etc/ntp.conf file to use your domain controller as the time server. Then sync your clock, start the NTP client, and install Samba:</p>
<pre>
# ntpdate ad01.rit.edu
# /etc/init.d/ntpd start
# rc-update add ntpd default
# emerge samba
</pre>
<p>Now you can configure kerberos. Open your /etc/krb5.conf file and make it look like this:</p>
<pre>
[libdefaults]
  ticket_lifetime = 600
  default_realm = RIT.EDU
  clockskew = 120

[realms]
  RIT.EDU = {
    kdc = ad01.rit.edu
    default_domain = RIT.EDU
  }

[domain_realm]
  .rit.edu = RIT.EDU
  rit.edu = RIT.EDU
</pre>
<p>Test your kerberos setup by requesting a ticket from your domain controller.</p>
<pre>
# kinit administrator
# klist
# kdestroy</pre>
<p>Edit your Samba configuration.</p>
<pre>
[global]
  workgroup = RIT
  realm = RIT.EDU
  server string =

  log file = /var/log/samba/log.%m
  max log size = 50

  hosts allow = 127.0.0.1 129.21.0.0/16   
  hosts deny = 0.0.0.0/0
  security = ADS
  allow trusted domains = yes
  password server = ad01.rit.edu
  encrypt passwords = yes
  min protocol = NT1

  winbind enum users = yes
  winbind enum groups = yes
  winbind cache time = 600
  winbind use default domain = yes
  template homedir = /home/%U
  obey pam restrictions = yes
  template shell = /bin/bash

  socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
  domain master = no
  local master = no

  idmap uid = 10000-99999
  idmap gid = 10000-99999
</pre>
<p>Add winbind to the daemon_list variable in /etc/conf.d/samba.</p>
<pre>daemon_list="smbd nmbd <strong>winbind</strong>"</pre>
<p>Join the domain and start Samba.</p>
<pre>
# net ads join -U administrator
# /etc/init.d/samba start
</pre>
<p>Add winbind to the passwd and group lines in /etc/nsswitch.conf.</p>
<pre>
passwd:      compat <strong>winbind</strong>
shadow:      compat
group:       compat <strong>winbind</strong>
</pre>
<p>Test user resolution and add Samba to the startup:</p>
<pre>
# getent passwd administrator
# rc-update add samba default
</pre>
<p>Add the bolded lines to your /etc/pam.d/system-auth file.</p>
<pre>
auth required pam_env.so
<strong>auth sufficient	pam_winbind.so</strong>
auth sufficient	pam_unix.so likeauth nullok <strong>use_first_pass</strong>
auth required pam_deny.so

account	required pam_access.so
<strong>account	sufficient pam_winbind.so</strong>
account	required pam_unix.so

password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
password sufficient pam_unix.so nullok md5 shadow use_authtok
password required pam_deny.so

session	required pam_limits.so
session	required pam_unix.so
<strong>session required pam_mkhomedir.so</strong>
</pre>
<p>That&#8217;s it! Now all you need to do is start samba and your box is an AD domain member.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unifieddiff.com/2006/10/04/samba-ad-domain-member/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Active Directory and Linux</title>
		<link>http://www.unifieddiff.com/2006/06/16/active-directory-linux/</link>
		<comments>http://www.unifieddiff.com/2006/06/16/active-directory-linux/#comments</comments>
		<pubDate>Sat, 17 Jun 2006 03:47:50 +0000</pubDate>
		<dc:creator>Bob</dc:creator>
				<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.robertjcarroll.com/2006/06/16/active-directory-linux/</guid>
		<description><![CDATA[I maintain several client and server machines that, up until recently, all authenticated users locally. I wanted a more centralized mechanism that could handle the various users and systems on the network. The big catch is that a few key system run Linux while others run Windows. So after doing some research, I turned to [...]]]></description>
			<content:encoded><![CDATA[<p>I maintain several client and server machines that, up until recently, all authenticated users locally. I wanted a more centralized mechanism that could handle the various users and systems on the network. The big catch is that a few key system run Linux while others run Windows. So after doing some research, I turned to Active Directory.</p>
<p>My first chore was to install Windows Server 2003 and configure it to be a domain controller. This part was fairly easy, although a little time-consuming. Once that was working I was able to quickly join the Windows machines to the domain. Now to deal with Linux&#8230; for that I chose Windows Services for Unix. This software alters the AD schema to allow for Unix account attributes. On the Linux machines, I installed OpenLDAP, a Kerberos client, configured PAM&#8230; and voila! Now AD users can authenticate on the Linux machines.</p>
<p>My home-made DHCP/DNS configuration tool, however, was a little trickier. The data for this tool is stored in a MySQL database and accessed via a PHP script. If I wanted to grant someone access to the tool, I needed to first give them a MySQL account. Since Active Directory is basically an LDAP server, I rewrote the authentication mechanism to query AD.</p>
<p>With very little work, I was able to simplify authentication and account management. While this is not new technology, I still feel all warm and fuzzy with a sense of accomplishment.</p>]]></content:encoded>
			<wfw:commentRss>http://www.unifieddiff.com/2006/06/16/active-directory-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
