Linux
FUSE Extension for PHP
by Bob on 15 December 2008, under FUSE, Linux, OS X, Open Source, PHP, Projects
Well, it’s official… I’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— I wrote a PHP script to screen-scrape the Trac web interface and allow me to grab source code to a project I’m working on.
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’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’d have to do it myself. I mean… how hard could it be?
It actually wasn’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’ve also since implemented TracFS to replace my ugly script.
(continue reading…)Building Amarok 1.4 on Leopard
by Bob on 30 June 2008, under Hacks, How To, Linux, OS X, Open Source
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’t want to wait for Amarok2 to become stable, so I looked into compiling Amarok 1.4 and running it under X.
I tried following the On OS X guide with limited success. Apparently, ffmpeg won’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’m not terribly familiar with x86 assembly.
(continue reading…)HOW TO: Samba as an AD Domain Member
by Bob on 4 October 2006, under Active Directory, Gentoo, How To, Linux, Samba
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’ve decided to compile my latest experiences here.
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.
# emerge ntp(continue reading…)
Active Directory and Linux
by Bob on 16 June 2006, under Active Directory, Linux, Security, Windows
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.
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… 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… and voila! Now AD users can authenticate on the Linux machines.
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.
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.